All Projects → ziozzang → socks5-proxy

ziozzang / socks5-proxy

Licence: MIT license
Socks5 Proxy with Go Lang. support USER_ID/PASSWORD. able to bypass HTTPS(SNI) censorship

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to socks5-proxy

3proxy
3proxy - tiny free proxy server
Stars: ✭ 2,493 (+8496.55%)
Mutual labels:  proxy-server, socks
Flynet
A powerful TCP/UDP tool, which support socks5 proxy by tcp and udp, http proxy and NAT traversal. This tool can help you bypass gfw easily
Stars: ✭ 124 (+327.59%)
Mutual labels:  proxy-server, socks
socks5 list
Auto-updated SOCKS5 proxy list + proxies for Telegram
Stars: ✭ 210 (+624.14%)
Mutual labels:  proxy-server, socks
Socks5
A full-fledged high-performance socks5 proxy server written in C#. Plugin support included.
Stars: ✭ 331 (+1041.38%)
Mutual labels:  proxy-server, socks
nimSocks
A filtering SOCKS proxy server and client library written in nim.
Stars: ✭ 51 (+75.86%)
Mutual labels:  proxy-server, socks
asyncio-socks-server
A SOCKS proxy server implemented with the powerful python cooperative concurrency framework asyncio.
Stars: ✭ 154 (+431.03%)
Mutual labels:  proxy-server, socks
Wyproxy
proxying and recording HTTP/HTTPs/Socks5 proxy flow, save to MYSQL database.
Stars: ✭ 477 (+1544.83%)
Mutual labels:  proxy-server, socks
SpoofDPI
A simple and fast anti-censorship tool written in Go
Stars: ✭ 170 (+486.21%)
Mutual labels:  proxy-server, anti-censorship
Psiphon
A multi-functional version of a popular network circumvention tool
Stars: ✭ 169 (+482.76%)
Mutual labels:  proxy-server, socks
3proxy
3proxy - tiny free proxy server
Stars: ✭ 2,263 (+7703.45%)
Mutual labels:  proxy-server, socks
microsocks11
A cross-platform SOCKS5 library and server based on the microsocks project.
Stars: ✭ 22 (-24.14%)
Mutual labels:  proxy-server, socks
Proxybroker
Proxy [Finder | Checker | Server]. HTTP(S) & SOCKS 🎭
Stars: ✭ 2,767 (+9441.38%)
Mutual labels:  proxy-server, socks
Socks5
A full-fledged high-performance socks5 proxy server written in C#. Plugin support included.
Stars: ✭ 286 (+886.21%)
Mutual labels:  proxy-server, socks
Shadowproxy
A proxy server that implements Socks5/Shadowsocks/Redirect/HTTP (tcp) and Shadowsocks/TProxy/Tunnel (udp) protocols.
Stars: ✭ 142 (+389.66%)
Mutual labels:  proxy-server, socks
Tor Socks Proxy
🐳 Tiny Docker(🤏 10MB) image as 🧅 Tor SOCKS5 proxy 🛡
Stars: ✭ 218 (+651.72%)
Mutual labels:  proxy-server, socks
Prox5
🧮 SOCKS5/4/4a 🌾 validating proxy pool and upstream SOCKS5 server for 🤽 LOLXDsoRANDum connections 🎋
Stars: ✭ 39 (+34.48%)
Mutual labels:  proxy-server, socks
html2canvas-csharp-proxy
C# Proxy html2canvas (aspx)
Stars: ✭ 16 (-44.83%)
Mutual labels:  proxy-server
yastack
YAStack: User-space network-stack based on DPDK, FreeBSD TCP/IP Stack, EnvoyProxy
Stars: ✭ 90 (+210.34%)
Mutual labels:  proxy-server
forwardingproxy
A HTTP/S forwarding proxy in Go
Stars: ✭ 55 (+89.66%)
Mutual labels:  proxy-server
Mallory
HTTP/HTTPS proxy over SSH
Stars: ✭ 251 (+765.52%)
Mutual labels:  proxy-server

SOCKS 5 Proxy with Go Lang

Original Library was imported from http://github.com/oov/socks5

I just modified and build for personal use.

this code support configuration loading.

  • IP mask must be CIDR format like "1.2.3.0/24". If you want allow all client, use CIDR as "0.0.0.0/0"
  • If ID/PW is supplied, use that. or IP restrictions

Additional Feature

  • HTTPS(SNI) Censorship in korea avoid function.

    • you can check the code at "socks5/server.go"
    • Tested 2019-02-19 (SK Broadband, Korea)
  • IPv6 Support

    • Some ISP only support IPv6 connection environment (Ex: Mobile phone tethering). and this proxy can support that.
    • tested OK. (2021-03-13 / SK telecomm, iPhone + Macbook Tethering, Korea)
  • Can be run as Cascade/Upstream Proxy.

    • You can setup with Adguard or some program. and works well :)

Installation

  • if you want to use with windows, use released binary.
  • if you want to use with linux(x86_64), just execute these command in console.
wget https://github.com/ziozzang/socks5-proxy/releases/download/1.0/socks5-proxy && chmod +x socks5-proxy
wget https://github.com/ziozzang/socks5-proxy/releases/download/1.0/socks5-proxy.config.template 

or you can run with docker. :)


docker build -t socks5proxy .
docker run --rm -it -v `pwd`/socks5-proxy.config:/app/socks5-proxy.config --net=host socks5proxy

  • don't forget to edit configuration.

Original socks5

Package socks5 implements a "SOCKS Protocol Version 5" server.

This server supports a subset of RFC 1928:

  • auth methods: "NO AUTHENTICATION REQUIRED", "USERNAME/PASSWORD"
  • commands: "CONNECT"
  • address types: "IP V4 address", "DOMAINNAME", "IP V6 address" (but tested "DOMAINNAME" only)

INSTALL

go get -u github.com/oov/socks5

USAGE

package main

import (
	"github.com/oov/socks5"
	"log"
)

func main() {
	srv := socks5.New()
	srv.AuthUsernamePasswordCallback = func(c *socks5.Conn, username, password []byte) error {
		user := string(username)
		if user != "guest" {
			return socks5.ErrAuthenticationFailed
		}

		log.Printf("Welcome %v!", user)
		c.Data = user
		return nil
	}
	srv.HandleConnectFunc(func(c *socks5.Conn, host string) (newHost string, err error) {
		if host == "example.com:80" {
			return host, socks5.ErrConnectionNotAllowedByRuleset
		}
		if user, ok := c.Data.(string); ok {
			log.Printf("%v connecting to %v", user, host)
		}
		return host, nil
	})
	srv.HandleCloseFunc(func(c *socks5.Conn) {
		if user, ok := c.Data.(string); ok {
			log.Printf("Goodbye %v!", user)
		}
	})

	srv.ListenAndServe(":12345")
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].