descriptionnone
repository URLhttps://github.com/rofl0r/microsocks.git
ownerretnyg@gmx.net
last changeSun, 18 Sep 2022 10:12:47 +0000 (18 10:12 +0000)
last refreshSat, 27 Apr 2024 05:31:36 +0000 (27 07:31 +0200)
content tags
add:
README.md

MicroSocks - multithreaded, small, efficient SOCKS5 server.

a SOCKS5 service that you can run on your remote boxes to tunnel connections through them, if for some reason SSH doesn't cut it for you.

It's very lightweight, and very light on resources too:

for every client, a thread with a stack size of 8KB is spawned. the main process basically doesn't consume any resources at all.

the only limits are the amount of file descriptors and the RAM.

It's also designed to be robust: it handles resource exhaustion gracefully by simply denying new connections, instead of calling abort() as most other programs do these days.

another plus is ease-of-use: no config file necessary, everything can be done from the command line and doesn't even need any parameters for quick setup.

History

This is the successor of "rocksocks5", and it was written with different goals in mind:

as a result of that, ipv4, dns, and ipv6 is supported out of the box and can use the same code, while rocksocks5 has several compile time defines to bring down the size of the resulting binary to extreme values like 10 KB static linked when only ipv4 support is enabled.

still, if optimized for size, this program when static linked against musl libc is not even 50 KB. that's easily usable even on the cheapest routers.

command line options

microsocks -1 -i listenip -p port -u user -P password -b bindaddr

all arguments are optional. by default listenip is 0.0.0.0 and port 1080.

option -1 activates auth_once mode: once a specific ip address authed successfully with user/pass, it is added to a whitelist and may use the proxy without auth. this is handy for programs like firefox that don't support user/pass auth. for it to work you'd basically make one connection with another program that supports it, and then you can use firefox too. for example, authenticate once using curl:

curl --socks5 user:password@listenip:port anyurl

Supported SOCKS5 Features

shortlog
2022-09-18 rofl0radd option -q to disable loggingmasterv1.0.4
2022-05-25 rofl0rfix thread stack size for solaris
2022-02-01 benRemove nugatory EC_TTL_EXPIRED error before idle connec... v1.0.3
2021-12-13 rofl0rimprove new code selecting connection target by bindadd...
2021-12-13 parkeprioritize getaddrinfo() results matching bindaddr...
2021-11-29 rofl0ruse a common FAILURE_TIMEOUT value for both resource...
2021-11-29 jacob.huangfix memory leak/high cpu use on fd exhaustion
2021-09-07 rofl0rMakefile: fix install on mac/BSD using install.sh[0]
2021-03-13 rofl0rREADME: specify supported SOCKS5 features
2021-02-03 timp87Provide simple example how to authenticate once using... v1.0.2
2020-10-24 rofl0ruse poll() instead of select()
2020-10-23 rofl0rauth-once: use pthread_rwlock_t for lock
2020-10-23 rofl0rauth-once mode: prevent same addr from being added...
2020-08-14 rofl0rclean up stacksize selection macros
2020-08-14 Pavel Timofeevadjust FreeBSD minimum stacksize to 32KB
2020-08-05 Pavel Timofeevserver_setup(): fix potential memory leak
...
tags
19 months ago v1.0.4
2 years ago v1.0.3
3 years ago v1.0.2
5 years ago v1.0.1
5 years ago v1.0.0
5 years ago v0.1.0
7 years ago v0.0.2
7 years ago v0.0.1
heads
19 months ago master