descriptionnone
repository URLhttps://github.com/rofl0r/microsocks.git
ownerretnyg@gmx.net
last changeFri, 24 May 2024 23:02:34 +0000 (24 23:02 +0000)
last refreshThu, 21 Nov 2024 07:35:08 +0000 (21 08:35 +0100)
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 low stack size 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 -q -i listenip -p port -u user -P passw -b bindaddr -w wl

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

Supported SOCKS5 Features

Troubleshooting

if you experience segfaults, try raising the THREAD_STACK_SIZE in sockssrv.c for your platform in steps of 4KB.

if this fixes your issue please file a pull request.

microsocks uses the smallest safe thread stack size to minimize overall memory usage.

shortlog
2024-05-24 rofl0rimprove throughput in copyloop() using bigger buffermaster
2024-05-24 rofl0radd -w whitelist option
2024-05-20 ThomasREADME: update for latest changes (#74)
2024-05-17 rofl0rmute warning about shadow declaration of bind_addr
2024-05-17 rofl0ruse a bigger thread stack by default
2022-09-18 rofl0radd option -q to disable loggingv1.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()
...
tags
2 years ago v1.0.4
2 years ago v1.0.3
3 years ago v1.0.2
5 years ago v1.0.1
6 years ago v1.0.0
6 years ago v0.1.0
7 years ago v0.0.2
7 years ago v0.0.1
heads
5 months ago master