lightsocks
support socks4, socks4a, socks5, socks5h, http proxy all in one
Help
Support socks4, socks4a, socks5, socks5h, http proxy all in one
Usage:
lightsocks [command]
Available Commands:
client Socks5+http proxy server act as lightsocks client
help Help about any command
server lightsocks server daemon
Flags:
-c, --config string config file (default "/Users/xmapst/.config/lightsocks.yml")
-h, --help help for lightsocks
Use "lightsocks [command] --help" for more information about a command.
Dashboard
Logs

Connections

Build
git clone https://github.com/xmapst/lightsocks.git
cd lightsocks
make
Start
see example configure
setsid ./bin/lightsocks server -c example/server.yaml
setsid ./bin/lightsocks client -c example/client.yaml
Service
Linux Server
echo > /etc/systemd/system/lightsocks-server.service <<EOF
[Unit]
Description=lightsocks - Support socks4, socks4a, socks5, socks5h, http proxy all in one
Documentation=https://github.com/xmapst/lightsocks.git
After=network.target nss-lookup.target
[Service]
NoNewPrivileges=true
ExecStart=/usr/local/bin/lightsocks server -c /etc/lightsocks.yaml
Restart=on-failure
RestartSec=10s
LimitNOFILE=infinity
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now lightsocks-server.service
Linux Client
echo > /etc/systemd/system/lightsocks-client.service <<EOF
[Unit]
Description=lightsocks - Support socks4, socks4a, socks5, socks5h, http proxy all in one
Documentation=https://github.com/xmapst/lightsocks.git
After=network.target nss-lookup.target
[Service]
NoNewPrivileges=true
ExecStart=/usr/local/bin/lightsocks client -c /etc/lightsocks.yaml
Restart=on-failure
RestartSec=10s
LimitNOFILE=infinity
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now lightsocks-client.service
Windows Server
New-Service -Name lightsocks-server -BinaryPathName "C:\lightsocks\lightsocks_windows_amd64.exe server -c C:\lightsocks\config.yaml" -DisplayName "lightsocks " -StartupType Automatic
sc.exe failure lightsocks-server reset= 0 actions= restart/0/restart/0/restart/0
sc.exe start lightsocks-server
Windows Client
New-Service -Name lightsocks-client -BinaryPathName "C:\lightsocks\lightsocks_windows_amd64.exe client -c C:\lightsocks\config.yaml" -DisplayName "lightsocks " -StartupType Automatic
sc.exe failure lightsocks-client reset= 0 actions= restart/0/restart/0/restart/0
sc.exe start lightsocks-client