hev socks5 server
2.6.9
HevSocks5Server adalah server Socks5 yang sederhana dan ringan untuk Unix.
CONNECT
standar.UDP ASSOCIATE
.FWD UDP
yang diperluas. (UDP dalam TCP) 1Lihat di sini untuk lebih jelasnya.
git clone --recursive https://github.com/heiher/hev-socks5-server
cd hev-socks5-server
make
# statically link
make ENABLE_STATIC=1
mkdir hev-socks5-server
cd hev-socks5-server
git clone --recursive https://github.com/heiher/hev-socks5-server jni
cd jni
ndk-build
git clone --recursive https://github.com/heiher/hev-socks5-server
cd hev-socks5-server
# will generate HevSocks5Server.xcframework
./build-apple.sh
main :
# Worker threads
workers : 4
# Listen port
port : 1080
# Listen address (ipv4|ipv6)
listen-address : ' :: '
# UDP listen port
udp-port : 1080
# UDP listen address (ipv4|ipv6)
# udp-listen-address: '::1'
# Listen ipv6 only
listen-ipv6-only : false
# Bind source address (ipv4|ipv6)
# It is overridden by bind-address-v{4,6} if specified
bind-address : ' '
# Bind source address (ipv4)
bind-address-v4 : ' '
# Bind source address (ipv6)
bind-address-v6 : ' '
# Bind source network interface
bind-interface : ' '
# Domain address type (ipv4|ipv6|unspec)
domain-address-type : unspec
# Socket mark (hex: 0x1, dec: 1, oct: 01)
mark : 0
# auth:
# file: conf/auth.txt
# username:
# password:
# misc:
# task stack size (bytes)
# task-stack-size: 8192
# connect timeout (ms)
# connect-timeout: 5000
# read-write timeout (ms)
# read-write-timeout: 60000
# stdout, stderr or file-path
# log-file: stderr
# debug, info, warn or error
# log-level: warn
# If present, run as a daemon with this pid file
# pid-file: /run/hev-socks5-server.pid
# If present, set rlimit nofile; else use default value
# limit-nofile: 65535
<USERNAME> <SPACE> <PASSWORD> <SPACE> <MARK> <LF>
bin/hev-socks5-server conf/main.yml
Kirim sinyal SIGUSR1
ke proses server kaus kaki5 setelah file otentikasi diperbarui.
killall -SIGUSR1 hev-socks5-server
Misalnya, batasi jumlah koneksi jerry
hingga 2
:
auth :
file : conf/auth.txt
jerry pass 1a
iptables -A OUTPUT -p tcp --syn -m mark --mark 0x1a -m connlimit --connlimit-above 2 -j REJECT
/**
* hev_socks5_server_main_from_file:
* @config_path: config file path
*
* Start and run the socks5 server, this function will blocks until the
* hev_socks5_server_quit is called or an error occurs.
*
* Returns: returns zero on successful, otherwise returns -1.
*
* Since: 2.6.7
*/
int hev_socks5_server_main_from_file ( const char * config_path );
/**
* hev_socks5_server_main_from_str:
* @config_str: string config
* @config_len: the byte length of string config
*
* Start and run the socks5 server, this function will blocks until the
* hev_socks5_server_quit is called or an error occurs.
*
* Returns: returns zero on successful, otherwise returns -1.
*
* Since: 2.6.7
*/
int hev_socks5_server_main_from_str ( const unsigned char * config_str ,
unsigned int config_len );
/**
* hev_socks5_server_quit:
*
* Stop the socks5 server.
*
* Since: 2.6.7
*/
void hev_socks5_server_quit ( void );
MIT
Klien hev-socks5-tunnel dan hev-socks5-tproxy mendukung relai UDP melalui TCP. ↩