Skip to content

Evilur/httpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpc

httpc - is a simple zero-conf http 1.1 server to use instead of the python http.server. It distributed as a binary or a source code for running on any platform where other servers cannot be run

Usage

To use this program, just run:

# To run http server on 8000 port
httpc 8000

# Without arguments - 8000 port is default
httpc

Installation

You can go to the release page and download one of the .deb packages

Also, this package is available on AUR

And, of course, you can build it from source

Building from source

Unix Makefiles

If you are able to use the make command on you target machine, you can just run in the root of this repo:

make clean install

This command will install a program to your machine. You can also configure the path of the program to install to:

make clean install BINPREFIX=YOUR_PATH

Without make

If you can't use make, just run this commands in the root of this repo:

gcc src/*.c -o httpc
cp httpc YOUR_PATH

Tips and Tricks

By default, linux doesn't allow you listen port which is less than 1024 without root privileges. So you can't just run:

httpc 80

# You need to use sudo
sudo httpc 80

But if you run this command, it allows you to listen 80 port without sudo:

sudo setcap 'cap_net_bind_service=+ep' PATH_TO_BINARY

# Example
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/httpc

About

Simple, zero-conf http server to use instead of python http.server

Topics

Resources

License

Stars

Watchers

Forks