# StarryProxy
**Repository Path**: Saxonsa/starry-proxy
## Basic Information
- **Project Name**: StarryProxy
- **Description**: A proxy based on libp2p and goproxy
- **Primary Language**: Go
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-10-22
- **Last Updated**: 2021-11-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: libp2p, goproxy, Go语言
## README
# StarryProxy
a proxy based on [`libp2p`](https://github.com/libp2p/go-libp2p) and [`goproxy`](https://github.com/elazarl/goproxy)
Part of inspiration comes from [`p2p-proxy`](https://github.com/diandianl/p2p-proxy)
Create your own `env.json` file, APPCODE will be obtained in cz88 aliyun service
```json
{
"APPCODE": "xxxx"
}
```
****1. Compile the program****
`go build .`
****2. Start the first node****
```cmd
.\StarryProxy.exe --p2p 9001 --proxy 9002
```
The 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****
```cmd
.\StarryProxy.exe -p2p 8001 -proxy 8002 -snid /ip4/127.0.0.1/tcp/9001/ipfs/QmcgYHUS7jnvBnBjxqHx4Wh7HZYfcZLA3oKK6oLgxGT2TZ
```
The 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
```