首先用putty.exe登录你的linux vps.然后:
# wget http://download.sourceforge.net/project/ssocks/ssocks-0.0.14.tar.gz
# tar zxvf ssocks-0.0.14.tar.gz
# cd ssocks-0.0.14
# ./configure
# make
# make install
安装完毕。ssocks的执行文件为ssocksd,配置用户认证的文件为/usr/local/etc/ssocksd.auth
先去配置用户认证:
# nano /usr/local/etc/ssocksd.auth
注释掉admin:abcde这行,在其下面添加一行:
username:password
(username改为你设置的用户名,password改为你设置的密码)
然后
# nohup ssocksd --port 34567 -a /usr/local/etc/ssocksd.auth &
(34567可改为你设置的端口号)
# killall ssocksd
# nohup ssocksd --port 34567 -a /usr/local/etc/ssocksd.auth &
( 这个命令nohup ssocksd --port 34567 -a /usr/local/etc/ssocksd.auth &是默认不调用配置文件。如果要调用配置文件,可以这样写:
# nohup ssocksd --file /usr/local/etc/ssocksd.conf -a /usr/local/etc/ssocksd.auth &
如果这样写的话,就应先去编辑ssocksd.conf,在里面修改端口号。)
ssocksd自身提供了已daemon方式运行的参数"-d",所以运行的命令也可为:
ssocksd --port 34567 -a /usr/local/etc/ssocksd.auth -d
如果要配置浏览器直接使用这个socks5代理服务器程序翻墙,则:
先取消用户认证,
nano /usr/local/etc/ssocksd.auth
注释掉admin:abcde这行,其下面添加的username:password统统注释掉。
nano /etc/systemd/system/ssocksd.service
内容为:
然后运行:
然后,你就可关闭putty.exe,运行tor browser,在新版的tor vidalia 程序中,点击“设置中继服务器”-“网络”-勾选“我使用代理服务器连接到网络”-address栏填写你的vps的主机名或ip,端口填写你的ssocks server的端口:34567.
然后点击“确定”。这样通过你建立的socks 5代理,即可很顺利的连接上tor网络,设置浏览器的socks代理为127.0.0.1:9050,从而可用tor顺利的翻墙。
项目地址:https://sourceforge.net/projects/ssocks/
下载地址:https://sourceforge.net/projects/ssocks/files/ssocks-0.0.14.tar.gz/download
-------------------------------------------
- Configuration file
- Authentication file
- Generate a connection log file
- Daemon mode
- Server support bind mode
- Socks4 support (if authentication is enable socks4 is disable)
- Support choose of interface to bind
- IPV6 support
- UDP support
- Stock password with a hash ( md5 or sha256 )
- GSSAPI auth support ( maybe )
- Set number of client max ( actually 255 is in client.h MAXCLI var )
- Add --pid-file option to server
- ssocks bind localhost, not all
- SSL implements out of RFC
- nsocks is a netcat like through a socks5 (usefull to test socks server)
- ssocksd is the socks5 server
- ssocks is a socks5 relay, it run a socks server on your localhost interface, and relay all data to the server specified in parameter (works but under dev)
- rssocks is a reverse socks5 server ( POC under dev )
- rcsocks is a reverse socks5 client ( POC under dev )
- /etc/ssocksd.conf is server configuration file
- /etc/ssocksd.auth is password file
- /var/log/ssocksd.log is default log (specified in configuration file)
- /var/run/ssocksd.pid is create in daemon mode and delete when it receive SIGTERM
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle
Building on linux:
mkdir build
cd build
cmake ..
make
from https://github.com/luckypoem/ssocks
----
sSocks是一个跨平台的socks代理工具套装,可用来开启socks代理服务,支持socks5验证,支持IPV6和UDP,并提供反向socks代理服务
nsocks 类似通过Socks5代理后的netcat,可用来测试socks server
ssocksd 用来开启Socks5代理服务
ssocks 本地启用Socks5服务,并反弹到另一IP地址
rcsocks 接收反弹过来的Socks5服务,并转向另一端口
原项目地址:
How to use?Windows Visual Studio 2019 编译
mkdir build
cd build
cmake ..
msbuild ssocks.sln /p:Configuration=Release
Linux 编译
mkdir build
cd build
cmake ..
make
Original READMEFeatures:
- Configuration file
- Authentication file
- Generate a connection log file
- Daemon mode
- Server support bind mode
- Socks4 support (if authentication is enable socks4 is disable)
- Support choose of interface to bind
Software:
- nsocks is a netcat like through a socks5 (usefull to test socks server)
- ssocksd is the socks5 server
- ssocks is a socks5 relay, it run a socks server on your localhost interface, and relay all data to the server specified in parameter (works but under dev)
- rssocks is a reverse socks5 server ( POC under dev )
- rcsocks is a reverse socks5 client ( POC under dev )
File:
- /etc/ssocksd.conf is server configuration file
- /etc/ssocksd.auth is password file
- /var/log/ssocksd.log is default log (specified in configuration file)
- /var/run/ssocksd.pid is create in daemon mode and delete when it receive SIGTERM
from https://github.com/log4she11/sSocks(github.com/tostercx/ssocks)