项目
在 GitHub 查看
things-go/go-socks5
关于
使用纯 Go 编写的 SOCKS5 服务器,提供丰富的自定义选项,完整支持 TCP/UDP 和 IPv4/IPv6。
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- +2
- 15天
- +6
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文go-socks5
Provides the socks5 package that implements a SOCKS5.
SOCKS (Secure Sockets) is used to route traffic between a client and server through
an intermediate proxy layer. This can be used to bypass firewalls or NATs.
Feature
The package has the following features:
- Support socks5 server
- Support TCP/UDP and IPv4/IPv6
- Unit tests
- "No Auth" mode
- User/Password authentication optional user addr limit
- Support for the CONNECT command
- Support for the ASSOCIATE command
- Rules to do granular filtering of commands
- Custom DNS resolution
- Custom goroutine pool
- buffer pool design and optional custom buffer pool
- Custom logger
TODO
The package still needs the following:
- Support for the BIND command
Installation
Use go get.
go get github.com/things-go/go-socks5
Then import the socks5 server package into your own code.
import "github.com/things-go/go-socks5"
Example
Below is a simple example of usage, more see example
package main
import (
"log"
"os"
"github.com/things-go/go-socks5"
)
func main() {
// Create a SOCKS5 server
server := socks5.NewServer(
socks5.WithLogger(socks5.NewLogger(log.New(os.Stdout, "socks5: ", log.LstdFlags))),
)
// Create SOCKS5 proxy on localhost port 8000
if err := server.ListenAndServe("tcp", ":8000"); err != nil {
panic(err)
}
}
Reference
License
This project is under MIT License. See the LICENSE file for the full license text.
探索相关项目
加载中…