GithubHelp home page GithubHelp logo

nndroid / go-socks5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from things-go/go-socks5

0.0 0.0 0.0 188 KB

:smirk: socks5 server in pure Golang with much custom optional. Full TCP/UDP and IPv4/IPv6 support.

License: MIT License

Go 100.00%

go-socks5's Introduction

go-socks5

GoDoc Go.Dev reference Action Status codecov Go Report Card License Tag

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.

Donation

if package help you a lot,you can support us by:

Alipay

alipay

WeChat Pay

wxpay

go-socks5's People

Contributors

armon avatar bigmartha avatar cxz66666 avatar dependabot[bot] avatar miladrahimi avatar moloch-- avatar oxtoacart avatar peerxu avatar svent avatar thinkgos avatar ymmt2005 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.