Provide a Simple Proxys Server
- Http
- Https
- Socket5(TCP + UDP)
No Authentication
Start a Socket5 Server
package main
import (
"github.com/blacknight2018/GoProxys"
"net"
)
func main() {
b, _ := net.ResolveTCPAddr("tcp4", ":8888")
s := GoProxys.DefaultSocket5()
s.RunSocket5Proxy(b)
}
If you want to watch the tcp/udp data
package main
import (
"fmt"
"github.com/blacknight2018/GoProxys"
"net"
)
func main() {
b, _ := net.ResolveTCPAddr("tcp4", ":8888")
s := GoProxys.DefaultSocket5()
s.TcpCallBack = func(send bool, sender string, receiver string, data []byte, dataLen int) {
fmt.Println("tcp", sender)
}
s.UdpCallBack = func(send bool, sender string, receiver string, data []byte, dataLen int) {
fmt.Println("udp", sender)
}
s.RunSocket5Proxy(b)
}
Support Https
package main
import (
"github.com/blacknight2018/GoProxys"
"net"
)
func main() {
b, _ := net.ResolveTCPAddr("tcp4", ":8888")
h := GoProxys.DefaultHttp()
h.RunHttpProxy(b)
}
You can contact with me by wechat