2020-04-19 09:08:22 +00:00
|
|
|
go-socks5
|
2014-01-22 23:49:51 +00:00
|
|
|
=========
|
|
|
|
|
2020-04-19 09:11:00 +00:00
|
|
|
[![Build Status](https://travis-ci.org/thinkgos/go-socks5.svg?branch=master)](https://travis-ci.org/thinkgos/go-socks5)
|
|
|
|
[![codecov](https://codecov.io/gh/thinkgos/go-socks5/branch/master/graph/badge.svg)](https://codecov.io/gh/thinkgos/go-socks5)
|
|
|
|
![Action Status](https://github.com/thinkgos/go-socks5/workflows/Go/badge.svg)
|
|
|
|
[![Go Report Card](https://goreportcard.com/badge/github.com/thinkgos/go-socks5)](https://goreportcard.com/report/github.com/thinkgos/go-socks5)
|
|
|
|
[![License](https://img.shields.io/github/license/thinkgos/go-socks5)](https://github.com/thinkgos/go-socks5/raw/master/LICENSE)
|
2020-04-19 09:08:22 +00:00
|
|
|
|
2014-01-23 22:22:07 +00:00
|
|
|
Provides the `socks5` package that implements a [SOCKS5 server](http://en.wikipedia.org/wiki/SOCKS).
|
|
|
|
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:
|
|
|
|
* "No Auth" mode
|
|
|
|
* User/Password authentication
|
|
|
|
* Support for the CONNECT command
|
|
|
|
* Rules to do granular filtering of commands
|
|
|
|
* Custom DNS resolution
|
|
|
|
* Unit tests
|
|
|
|
|
|
|
|
TODO
|
|
|
|
====
|
|
|
|
|
|
|
|
The package still needs the following:
|
|
|
|
* Support for the BIND command
|
|
|
|
* Support for the ASSOCIATE command
|
|
|
|
|
2014-06-27 05:39:00 +00:00
|
|
|
|
|
|
|
Example
|
|
|
|
=======
|
|
|
|
|
|
|
|
Below is a simple example of usage
|
|
|
|
|
|
|
|
```go
|
|
|
|
// Create a SOCKS5 server
|
|
|
|
conf := &socks5.Config{}
|
|
|
|
server, err := socks5.New(conf)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Create SOCKS5 proxy on localhost port 8000
|
|
|
|
if err := server.ListenAndServe("tcp", "127.0.0.1:8000"); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-04-19 09:13:57 +00:00
|
|
|
# Reference
|
|
|
|
original armon go-sock5 [go-sock5](https://github.com/armon/go-socks5)
|