a proxy based on libp2p and goproxy
Part of inspiration comes from p2p-proxy
Create your own env.json file, APPCODE will be obtained in cz88 aliyun service
{
"APPCODE": "xxxx"
}1. Compile the program
go build .
2. Start the first node
.\StarryProxy.exe --p2p 9001 --proxy 9002The result you will see:
Proxy server is ready
libp2p-peer addresses:
/ip4/127.0.0.1/tcp/9001/ipfs/QmcgYHUS7jnvBnBjxqHx4Wh7HZYfcZLA3oKK6oLgxGT2TZ
3. Start the normal node
.\StarryProxy.exe -p2p 8001 -proxy 8002 -snid /ip4/127.0.0.1/tcp/9001/ipfs/QmcgYHUS7jnvBnBjxqHx4Wh7HZYfcZLA3oKK6oLgxGT2TZThe result you will see:
Proxy server is ready
libp2p-peer addresses:
/ip4/127.0.0.1/tcp/8001/ipfs/QmNVs2BR1XxwEEEvUXQu5PTCtfTJsdZGaLdfWyAGQhwZ6H
/ip4/127.0.0.1/tcp/8002
proxy listening on 127.0.0.1:8002