|
| 1 | +.Dd February 11, 2025 |
| 2 | +.Dt MICROSOCKS 1 |
| 3 | +.Os |
| 4 | +.Sh NAME |
| 5 | +.Nm microsocks |
| 6 | +.Nd tiny SOCKS5 server with very moderate resource usage |
| 7 | +.Sh SYNOPSIS |
| 8 | +.Bk -words |
| 9 | +.Bl -tag -width microsocks |
| 10 | +.It Nm |
| 11 | +.Op Fl 1q |
| 12 | +.Op Fl b Ar ip |
| 13 | +.Op Fl i Ar addr |
| 14 | +.Op Fl P Ar pass |
| 15 | +.Op Fl p Ar port |
| 16 | +.Op Fl u Ar user |
| 17 | +.Op Fl w Ar ips |
| 18 | +.Oc |
| 19 | +.El |
| 20 | +.Ek |
| 21 | +.Sh DESCRIPTION |
| 22 | +.Nm microsocks |
| 23 | +is a multithreaded, tiny, portable SOCKS5 server with very moderate resource |
| 24 | +usage that you can run on your remote boxes to tunnel connections through them, |
| 25 | +if for some reason SSH doesn't cut it for you. |
| 26 | +It is very lightweight, and very light on resources too: for every client, a |
| 27 | +thread with a low stack size is spawned. the main process basically doesn't |
| 28 | +consume any resources at all. It is also designed to be robust: it handles |
| 29 | +resource exhaustion gracefully by simply denying new connections, instead of |
| 30 | +calling |
| 31 | +.Xr abort 3 |
| 32 | +as most other programs do these days. |
| 33 | +Another plus is ease-of-use: no config file necessary, everything can be done |
| 34 | +from the command line and doesn't even need any parameters for quick setup. |
| 35 | +.Sh OPTIONS |
| 36 | +The following options are supported by |
| 37 | +.Nm : |
| 38 | +.Bl -tag -width indent |
| 39 | +.It Fl 1 |
| 40 | +Activates auth_once mode: once a specific IP address authorized successfully |
| 41 | +with user:password pair, it is added to a whitelist and may use the proxy |
| 42 | +without authorization. This is handy for programs like Firefox that don't |
| 43 | +support user:password authorization. For it to work you'd basically make one |
| 44 | +connection with another program that supports it, and then you can use Firefox |
| 45 | +too. This option requires options |
| 46 | +.Fl u |
| 47 | +and |
| 48 | +.Fl P |
| 49 | +also to be specified. |
| 50 | +.It Fl b Ar ip |
| 51 | +Specifies IP address outgoing connections are bound to. |
| 52 | +.It Fl i Ar addr |
| 53 | +Specifies local address to listen connections on. Host name or IP address can be |
| 54 | +supplied. Default to |
| 55 | +.Cm 0.0.0.0 . |
| 56 | +.It Fl P |
| 57 | +Specifies authorization password. This option requires |
| 58 | +.Fl u |
| 59 | +also to be specified. |
| 60 | +.It Fl p |
| 61 | +TCP port to listen to. Default to |
| 62 | +.Cm 1080 . |
| 63 | +.It Fl q |
| 64 | +Quiet mode: suppress logging messages. |
| 65 | +.It Fl u |
| 66 | +Specifies authorization username value. This option requires |
| 67 | +.Fl P |
| 68 | +also to be specified. |
| 69 | +.It Fl w |
| 70 | +A comma-separated whitelist of IP addresses, that may use the proxy without |
| 71 | +authentication. e.g. |
| 72 | +.Cm -w 127.0.0.1,192.168.1.1.1,::1 |
| 73 | +or just |
| 74 | +.Cm -w 10.0.0.1 . |
| 75 | +To allow access ONLY to those IPs, choose an impossible to guess user:password |
| 76 | +combination. |
| 77 | +.El |
| 78 | +.Sh EXAMPLES |
| 79 | +Require authentication for all except two specified hosts. |
| 80 | +.Pp |
| 81 | +.Dl $ microsocks -w 192.168.1.100,192.168.1.101 -u user -P secret |
| 82 | +.Pp |
| 83 | +Listen on port 8080 and use 46.62.90.74 as a source IP for external connections. |
| 84 | +.Pp |
| 85 | +.Dl $ microsocks -i 0.0.0.0 -b 46.62.90.74 -p 8080 |
| 86 | +.Pp |
| 87 | +Connect to |
| 88 | +.Lk https://freebsd.org |
| 89 | +using |
| 90 | +.Cm curl |
| 91 | +command through the running |
| 92 | +.Nm . |
| 93 | +.Pp |
| 94 | +.Dl $ curl --socks5 user:password@127.0.0.1:1080 https://freebsd.org |
| 95 | +.Sh AUTHORS |
| 96 | +Author of |
| 97 | +.Nm |
| 98 | +is |
| 99 | +.An rofl0r Aq Lk https://github.com/rofl0r/microsocks |
| 100 | +.Pp |
| 101 | +This man page is maintained by |
| 102 | +.An Viacheslav Chimishuk Aq Mt vchimishuk@yandex.ru |
0 commit comments