lightsocks

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

LightSocks

FOSSA Status

support socks4, socks4a, socks5, socks5h, http proxy all in one

Help

Support socks4, socks4a, socks5, socks5h, http proxy all in one,

Usage:
  ./bin/lightsocks_darwin_amd64 [flags]

Flags:
  -c, --config string   config file path (default "config.yaml")
  -h, --help            help for /lightsocks

Dashboard

Logs

Logs

Connections

Connections

Build

git clone https://github.com/xmapst/lightsocks.git
cd lightsocks
make

Direct Mode

see config.yaml configure

./lightsocks -c example/config.yaml

Proxy Mode

see server.yaml and client.yaml configure

sitsed ./lightsocks -c example/server.yaml 
sitsed ./lightsocks -c example/client.yaml

Service

Linux
echo > /etc/systemd/system/lightsocks.service <<EOF
[Unit]
Description=lightsocks - Support socks4, socks4a, socks5, socks5h, http proxy all in one
Documentation=https://github.com/xmapst/lightsocks
After=network.target nss-lookup.target

[Service]
NoNewPrivileges=true
ExecStart=/usr/local/bin/lightsocks -c /etc/lightsocks.yaml
Restart=on-failure
RestartSec=10s
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target
EOF

systemctl daemon-reload
systemctl enable --now lightsocks.service
Windows
New-Service -Name lightsocks -BinaryPathName "C:\lightsocks\lightsocks_windows_amd64.exe -c C:\lightsocks\client.yaml" -DisplayName  "lightsocks " -StartupType Automatic
sc.exe failure lightsocks reset= 0 actions= restart/0/restart/0/restart/0
sc.exe start lightsocks

License

FOSSA Status

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