Skip to content

mkocot/go-socks5

 
 

Repository files navigation

go-socks

Build status Latest commit Latest release License Go Report Card Go version

This is an fork of go-socks5 by armon, as the mentioned repository does not seem to be updated.

This is an fork of go-socks by bokysan.

Notable changes:

This module provides a package which implements a SOCKS4/ SOCKS5 server. 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.

Features

The package has the following features:

  • SOCKS4 and SOCKS5 support
  • "No Auth" mode or User/Password authentication
  • Support for CONNECT command
  • Rules to do granular filtering of commands
  • Custom DNS resolution
  • Unit tests
  • Support for socks4 if enabled

TODO

The package still needs the following:

  • Support for the BIND command
  • Support for the ASSOCIATE command

Example

Below is a simple example of usage

package main

import socks5 "github.com/mkocot/go-socks5/v2"

// 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)
}

About

SOCKS5 server in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%