Total Pageviews

Saturday 23 May 2020

支持用户认证的socks代理服务器程序:socks-by-qsantos

on linux vps.
git clone https://github.com/qsantos/socks socks-by-qsantos
cd socks-by-qsantos
make
(在当前目录下,会生成可执行文件socks)
./socks -h
显示:
Usage: ./socks mode [OPTIONS] [-f file|proxy1 [proxy2...]]
The proxies are chained to strenghten privacy

mode:
  cat    c  stdin and stdout are piped through the proxy chain
  serve  s  starts a server sending data through the chain
  check  k  check the proxy chain

OPTIONS:
  --continue  -c  ignore any unreachable proxy and test the next one
  --verbose   -v  show more information

proxies: the list of proxies can be given as the arguments of the command line
         or as a file (one per line) ; if no option is given, stdin is assumed
         a proxy is of the form

host:port[:type[:user:pass]]
  host   is an IPv4, IPv6 (not after a SOCKS4 proxy) or domain address
  port   is the port where the server listens for connections
  type   optionnal, can be either 'socks4' or 'socks5'
  user   optionnal, used for username/password authentication
  pass   optionnal, used for username/password authentication

于是,
./socks serve host 127.0.0.1 port 3267 user myusername pass mypassword

可用作各类tunnel程序的后端程序。



No comments:

Post a Comment