lightsocks

package module
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

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

Logs

Connections

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name      = "lightsocks"
	Version   string
	GoVersion = runtime.Version()
	GoOs      = runtime.GOOS
	GoArch    = runtime.GOARCH
	GitUrl    = "https://github.com/xmapst/lightsocks.git"
	GitBranch string
	GitCommit string
	BuildTime string
)

Functions

func PrintHeadInfo

func PrintHeadInfo()

func StaticFile

func StaticFile(urlPrefix string) gin.HandlerFunc

StaticFile 使用go.16新的特性embed 到包前端编译后的代码. 替代nginx. one binary rules them all

func VersionIfo

func VersionIfo() string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL