Skip to main content

Socks5 async proxy server

Project description

Socks5 async proxy server

Saturn is a SOCKS5 server based on asyncio protocols

Installation

From pypi.org

pip install saturn-proxy-server

From this repo

git clone https://git.best-service.online/yurzs/saturn.git
cd saturn
python3 ./setup.py install

Usage

Please edit config.py file before starting your server.
By default proxying allowed to all hosts (ALLOWED_DESTINATIONS = ["0.0.0.0/0"]). You can specify single IP addresses (both IPv4 and IPv6) and subnets.

import saturn
saturn.config.ALLOWED_DESTINATIONS = ["192.168.1.0/24"]
saturn.config.AUTHENTICATION_METHODS = ["saturn.auth.none"]
saturn.start_server("127.0.0.1", 8080) 

This config will allow passwordless connections with allowed proxying for 192.168.1.0-192.169.1.255 IP range. You can use multiple auth methods at once like ["saturn.auth.none", saturn.auth.dict"]

Authentication methods

Current SOCKS5 standart supports

  • None ["saturn.auth.none"]
  • GSSAPI ["saturn.auth.gssapi"]
  • Login/Password (dict format) ["saturn.auth.dict"]

Custom authentication methods

You can implement your own authentication method (Login/Password)
All you need to do is to implement Authenticator class with async def authenticate(self, data) method which will return bool authentication result. Then just import your module and use it in config
saturn.config.AUTHENTICATION_METHODS = ["your_auth_method"] You can see examples in saturn.auth

TODO list

  • Logging
  • Max socket limit
  • More tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saturn_proxy_server-0.5.tar.gz (7.9 kB view details)

Uploaded Source

File details

Details for the file saturn_proxy_server-0.5.tar.gz.

File metadata

  • Download URL: saturn_proxy_server-0.5.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5

File hashes

Hashes for saturn_proxy_server-0.5.tar.gz
Algorithm Hash digest
SHA256 435cf605c8b3a9ce9c6385315ad6cbad467388ca5ac3ad3a7b8cb440b48c6e83
MD5 2c285b17e9e8dc1837017c8120358696
BLAKE2b-256 d1c0e50bf2f9f44ba8afe649dc16d1721e18103bb909152dfde15d635d9a98c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page