• Stars
    star
    622
  • Rank 72,195 (Top 2 %)
  • Language
    Go
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple and powerful proxy

spp

Go Report Card

SPP is a simple and powerful proxy

Note: This tool is only to be used for study and research, do not use it for illegal purposes

image

Features

  • Supported protocol: TCP, UDP, RUDP (Reliable UDP), RICMP (Reliable ICMP), RHTTP (Reliable HTTP), KCP, Quic
  • Support type: forward proxy, reverse agent, SOCKS5 forward agent, SOCKS5 reverse agent
  • Agreement and type can be freely combined
  • External agent agreement and internal forwarding protocols can freely combine
  • Support Shadowsocks plug-in, spp-shadowsocks-pluginspp-shadowsocks-plugin-android

Instructions

Server

  • Start Server, assume that the server IP is www.server.com, listening port 8888
# ./spp -type server -proto tcp -listen :8888
  • You can also listen simultaneously with other types of ports and protocols.
# ./spp -type server -proto tcp -listen :8888 -proto rudp -listen :9999 -proto ricmp -listen 0.0.0.0
  • Can also use Docker
# docker run --name my-server -d --restart=always --network host esrrhs/spp ./spp -proto tcp -listen :8888

Client

  • Start TCP forward proxy, map the 8080 port of www.server.com to the local 8080 so that access to local 8080 is equivalent to accessing www.server.com 8080
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto tcp
  • Start the TCP reverse agent, map the local 8080 to the 8080 port of www.server.com, which visit www.server.com 8080 is equivalent to accessing the local 8080
# ./spp -name "test" -type reverse_proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto tcp
  • Start TCP Positive Socks5 Agent, open the SOCKS5 protocol in the local 8080 port, access the network in Server through Server
# ./spp -name "test" -type socks5_client -server www.server.com:8888 -fromaddr :8080 -proxyproto tcp
  • Start TCP Reverse Socks5 Agent, open the Socks5 protocol at www.server.com's 8080 port, access the network in the client through the Client
# ./spp -name "test" -type reverse_socks5_client -server www.server.com:8888 -fromaddr :8080 -proxyproto tcp
  • Other proxy protocols, only need to modify the proxyProto parameters of the client, for example
Proxy UDP
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto udp

Proxy rudp
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8081 -toaddr :8081 -proxyproto rudp

Proxy ricmp
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8082 -toaddr :8082 -proxyproto ricmp

At the same time, the above three
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto udp -fromaddr :8081 -toaddr :8081 -proxyproto rudp -fromaddr :8082 -toaddr :8082 -proxyproto ricmp

  • Internal communication between Client and Server, can also be modified to other protocols, automatic conversion between external protocols and internal protocols. E.g
Proxy TCP, internal RUDP protocol forwarding
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto tcp -proto rudp

Proxy TCP, internal RICMP protocol forwarding
# ./spp -name "test" -type proxy_client -server www.server.com -fromaddr :8080 -toaddr :8080 -proxyproto tcp -proto ricmp

Agent UDP, internal TCP protocol forwarding
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto udp -proto tcp

Agent UDP, internal KCP protocol forwarding
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto udp -proto kcp

Proxy TCP, internal Quic protocol forwarding
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto tcp -proto quic

Proxy TCP, internal RHTTP protocol forwarding
# ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto tcp -proto rhttp
  • Can also use Docker
# docker run --name my-client -d --restart=always --network host esrrhs/spp ./spp -name "test" -type proxy_client -server www.server.com:8888 -fromaddr :8080 -toaddr :8080 -proxyproto tcp

Performance Testing

  • Test the maximum bandwidth speed in the case where the IPERF script using the Benchmark / local_tcp directory is tested in the CPU. The proxy protocol is TCP, and the results of various transit protocols are used as follows:
Agent Speed Speed (Ency) Speed (Encryption Compression)
Direct connection 3535 MBytes/sec
tcp forwarding 663 MBytes/sec 225 MBytes/sec 23.4 MBytes/sec
rudp forwarding 5.15 MBytes/sec 5.81 MBytes/sec 5.05 MBytes/sec
ricmp forwarding 3.34 MBytes/sec 3.25 MBytes/sec 3.46 MBytes/sec
rhttp forwarding 10.7 MBytes/sec 10.8 MBytes/sec 8.73 MBytes/sec
kcp forwarding 18.2 MBytes/sec 18.6 MBytes/sec 14.7 MBytes/sec
quic forwarding 35.5 MBytes/sec 32.8 MBytes/sec 15.1 MBytes/sec
  • Using the IPERF script of the Benchmark / Remote_TCP directory, in the multi-machine test, the server is located in Tencent Cloud, the client is located locally, and the maximum bandwidth speed is tested. The proxy protocol is TCP, and the results of various transit protocols are used as follows:
Agent Speed Speed (Ency) Speed (Encryption Compression)
Direct connection 2.74 MBytes/sec
tcp forwarding 3.81 MBytes/sec 3.90 MBytes/sec 4.02 MBytes/sec
rudp forwarding 3.33 MBytes/sec 3.41 MBytes/sec 3.58 MBytes/sec
ricmp forwarding 3.21 MBytes/sec 2.95 MBytes/sec 3.17 MBytes/sec
rhttp forwarding 3.48 MBytes/sec 3.49 MBytes/sec 3.39 MBytes/sec
kcp forwarding 3.58 MBytes/sec 3.58 MBytes/sec 3.75 MBytes/sec
quic forwarding 3.85 MBytes/sec 3.83 MBytes/sec 3.92 MBytes/sec
  • Note: The test data is Centos.ISO, which has been compressed, so the effect of compression forwarding is not obvious.
  • If you want to directly test each protocol bandwidth of the network, use multi-protocol bandwidth test tools connperf

Thanks for free JetBrains Open Source license

More Repositories

1

pingtunnel

Pingtunnel is a tool that send TCP/UDP traffic over ICMP
Go
2,603
star
2

majiang_algorithm

麻将胡牌算法以及AI算法
Java
350
star
3

xiaohuangji

小黄鸡表情收集
Shell
294
star
4

atmosphere-switch

大气层switch破解方案
213
star
5

hookso

linux动态链接库的注入修改查找工具 A tool for injection, modification and search of linux dynamic link library
C++
202
star
6

fake

嵌入式脚本语言 Lightweight embedded scripting language
C++
198
star
7

fuckbaiduyun

百度网盘快速加解密工具
Go
80
star
8

go-engine

golang engine
Go
63
star
9

pingtunnel-qt

pingtunnel qt
Go
63
star
10

texas_algorithm

texas algorithm 德州扑克算法
Java
62
star
11

docker-thunder-xware

迅雷离线下载 docker 镜像 采用centos镜像和最新的xware 修复了大文件会挂掉的bug
Shell
49
star
12

fakejava

嵌入式脚本语言 Lightweight embedded scripting language
Java
49
star
13

lua-family-bucket

Lua全家桶,命令行调试、性能分析、代码覆盖率等. Lua family bucket, command line debugging, performance analysis, code coverage
43
star
14

dLua

类似gdb的lua调试器。Lua debugger like gdb
C++
38
star
15

yellowsocks

transparent TCP to SOCKS5 redirector
Go
32
star
16

go-cpuminer

纯go实现的cpu挖矿工具。cpu miner implemented by pure go
Go
30
star
17

connperf

多协议带宽测试工具. network bandwidth perf
Go
28
star
18

go-mosaic

相片马赛克 (Photographic mosaic)
Go
27
star
19

fanqiang-diy

自己搭建科学上网环境
21
star
20

cLua

Lua的代码覆盖率工具 Lua code coverage.
Go
20
star
21

fakengine

c++编写的游戏服务器引擎
C
17
star
22

teenpatti_algorithm

teenpatti algorithm
Java
13
star
23

wireshark_protobuf_plugin

wireshark的protobuf协议插件
C++
12
star
24

yellowdns

dns server proxy
Go
11
star
25

socksserver

simple socks5 server
Go
11
star
26

paodekuai_ai

跑得快AI 采用蒙特卡洛算法
Java
10
star
27

farmer_ai

斗地主AI 采用蒙特卡洛算法
Java
9
star
28

libmeng

跨平台的轻量级协程库
Assembly
8
star
29

selfmd5

计算自身md5的最小ELF64程序.The minimum ELF64 program to calculate its own md5
C
7
star
30

fakelua

FakeLua is a library for fast implementation of custom Lua
C++
7
star
31

socksfilter

socks5过滤器。socks5 server with filtering and forwarding
Go
7
star
32

AliEncoder

阿里味编解码。Alibaba Style Encoder
JavaScript
6
star
33

fakego

嵌入式脚本语言 Lightweight embedded scripting language
Go
6
star
34

spp-shadowsocks-plugin

spp shadowsocks plugin
Go
6
star
35

fakechat

P2P聊天工具
C++
6
star
36

wLua

监视lua状态机内部的工具。a tool that watch running lua state
C
6
star
37

bLua

C++ binding to Lua
C++
5
star
38

fake_game_server

fake脚本写的游戏服务器框架
C++
5
star
39

fastreplace

多线程文件替换工具. fast replace file content
Go
4
star
40

fLua

Diffing and patching for Lua variable
C++
4
star
41

liblu

c++ net framwork
C++
4
star
42

switch-crack

switch破解经验
4
star
43

spp-shadowsocks-plugin-android

spp shadowsocks plugin android
Shell
4
star
44

tetris

tetris ai
JavaScript
4
star
45

frps-GUI

frp server GUI
Visual Basic
3
star
46

gohome

some common go library
Go
3
star
47

fakecore

core code for game
Java
3
star
48

oLua

Optimize lua code
Go
3
star
49

fuck-music-player

C++
3
star
50

libmo

memory lib
C++
2
star
51

tcloud-cns-tool

腾讯云-域名解析-查询设置-工具
Go
2
star
52

fruit_machine

用cmd模拟水果机转圈算法
C++
2
star
53

renpy_translate

auto translate renpy game script
Batchfile
2
star
54

esrrhs.xyz

个人网站
CSS
1
star
55

printf_vector

like libc printf, but can use vector input
C++
1
star
56

multisim

1
star
57

build-v8

1
star
58

get-your-wheel

No need to reinvent the c++ wheel
1
star
59

fastremove

fast remove
Go
1
star
60

libyang

消息生成工具
C++
1
star
61

mLua

Lua's memory optimization management tool
C++
1
star