All Projects → tonyseek → Rsocks

tonyseek / Rsocks

Licence: mit
A SOCKS 4/5 reverse proxy server

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rsocks

spp
A simple and powerful proxy
Stars: ✭ 575 (+442.45%)
Mutual labels:  socks5, reverse-proxy
Goproxy
🔥 Proxy is a high performance HTTP(S) proxies, SOCKS5 proxies,WEBSOCKET, TCP, UDP proxy server implemented by golang. Now, it supports chain-style proxies,nat forwarding in different lan,TCP/UDP port forwarding, SSH forwarding.Proxy是golang实现的高性能http,https,websocket,tcp,socks5代理服务器,支持内网穿透,链式代理,通讯加密,智能HTTP,SOCKS5代理,黑白名单,限速,限流量,限连接数,跨平台,KCP支持,认证API。
Stars: ✭ 11,334 (+10592.45%)
Mutual labels:  reverse-proxy, socks5
Free proxy ss
分享来自互联网上免费的shadowsocks(SS)/ShadowsocksR(SSR)/V2ray(vmess)代理 每15分钟更新一次,每次各分享4个临时可用代理。 及时订阅、及时更新。
Stars: ✭ 72 (-32.08%)
Mutual labels:  socks5
Gsocks5
Secure SOCKS5 server in Go
Stars: ✭ 98 (-7.55%)
Mutual labels:  socks5
Ble Security Attack Defence
✨ Purpose only! The dangers of Bluetooth Low Energy(BLE)implementations: Unveiling zero day vulnerabilities and security flaws in modern Bluetooth LE stacks.
Stars: ✭ 88 (-16.98%)
Mutual labels:  reverse-proxy
Booster.js
The speed and performance optimizier for your website, delivering fast web experiences to users.
Stars: ✭ 1,215 (+1046.23%)
Mutual labels:  reverse-proxy
Gmailui
A GMail user interface library
Stars: ✭ 91 (-14.15%)
Mutual labels:  gmail
Gmailctl
Declarative configuration for Gmail filters
Stars: ✭ 1,171 (+1004.72%)
Mutual labels:  gmail
Ss Tproxy
搭建 SS/SSR/V2Ray/Socks5 透明代理环境的简易脚本
Stars: ✭ 1,561 (+1372.64%)
Mutual labels:  socks5
Shadow
A transparent proxy for Windows, Linux, macOS
Stars: ✭ 85 (-19.81%)
Mutual labels:  socks5
Sidedoor
SSH connection daemon for Debian/Raspbian/Ubuntu/etc
Stars: ✭ 97 (-8.49%)
Mutual labels:  reverse-proxy
Trojan Qt5
我並非原作者。
Stars: ✭ 80 (-24.53%)
Mutual labels:  socks5
Lightsocks Nodejs
It's a simple socks5 proxy tool which based on lightsocks
Stars: ✭ 79 (-25.47%)
Mutual labels:  socks5
Ecs Nginx Proxy
Reverse proxy for AWS ECS. Lets you address your docker containers by sub domain.
Stars: ✭ 93 (-12.26%)
Mutual labels:  reverse-proxy
Waveboxapp
Wavebox Classic has been updated to Wavebox 10. Learn more Wavebox.io
Stars: ✭ 1,198 (+1030.19%)
Mutual labels:  gmail
Websocks
A secure proxy based on WebSocket. 一个基于 WebSocket 的代理工具
Stars: ✭ 102 (-3.77%)
Mutual labels:  socks5
Tcptunnel
将本地内网服务器映射到公网。
Stars: ✭ 72 (-32.08%)
Mutual labels:  reverse-proxy
Venom
Venom - A Multi-hop Proxy for Penetration Testers
Stars: ✭ 1,228 (+1058.49%)
Mutual labels:  socks5
Trickster
Open Source HTTP Reverse Proxy Cache and Time Series Dashboard Accelerator
Stars: ✭ 1,306 (+1132.08%)
Mutual labels:  reverse-proxy
Cracker
tunnel over http[s]
Stars: ✭ 107 (+0.94%)
Mutual labels:  socks5

RSOCKS

RSOCKS is a reverse proxy server for transferring traffic of a specific host through a SOCKS 4/5 proxy. It is useful for using SOCKS 4/5 in applications that don't have SOCKS proxy support.

Installation

::

$ pip install rsocks

Or

::

$ easy_install rsocks

To upgrade to latest version, you could execute::

$ pip install -U rsocks

Resources

  • OS Service Templates <https://github.com/tonyseek/rsocks/tree/master/misc/platforms>_
  • Configuration Snippets <https://github.com/tonyseek/rsocks/tree/master/misc/snippets/configuration>_
  • Software Integration Guides <https://github.com/tonyseek/rsocks/wiki>_

Usage

First, we need to create a config file with following format::

# /path/to/rsocks.toml
[servers.foo]
proxy = "socks4://user:[email protected]:1080"
listen_host = "0.0.0.0"
listen_port = 5025
upstream_host = "smtp.example.com"
upstream_port = 25
upstream_ssl = false

There is an example for forwarding SMTP/IMAP of Gmail through a SOCKS5 proxy server::

[servers.imap]
proxy = "socks5://localhost:1080"
listen_port = 5993
upstream_host = "imap.gmail.com"
upstream_port = 993
upstream_ssl = true

[servers.smtp]
proxy = "socks5://localhost:1080"
listen_port = 5465
upstream_host = "smtp.gmail.com"
upstream_port = 465
upstream_ssl = true

Next, we start the rsocks server::

$ rsocks --config=/path/to/rsocks.toml
[14:24:44] rsocks.servers.smtp       Using proxy server socks5://localhost:1080
[14:24:44] rsocks.servers.smtp       Listening 127.0.0.1:5465
[14:24:44] rsocks.servers.imap       Using proxy server socks5://localhost:1080
[14:24:44] rsocks.servers.imap       Listening 127.0.0.1:5993
[14:24:44] rsocks.pool               Prepared "smtp"
[14:24:44] rsocks.pool               Prepared "imap"
[14:24:44] rsocks.servers.smtp       Starting server...
[14:24:44] rsocks.servers.imap       Starting server...

Don't stop it now, open your application (such as Airmail in OS X) and set the server option to local forwarding address::

SMTP: 127.0.0.1:5465 without SSL
IMAP: 127.0.0.1:5993 without SSL

Now the application's traffic will be forwarded through the proxy server (socks5://127.0.0.1:1080).

If you wish to run the rsocks server in background, please check the Platform Service Templates <https://github.com/tonyseek/rsocks/tree/master/misc/platforms>_. For example, OS X users can create com.tonyseek.rsocks.plist file in ~/Library/LaunchAgents and load it as a service::

$ nano ~/.rsocks.toml  # create a config file
$ wget https://github.com/tonyseek/rsocks/blob/master/misc/platforms/osx-launchd/com.tonyseek.rsocks.plist \
      -O ~/Library/LaunchAgents/com.tonyseek.rsocks.plist
$ nano ~/Library/LaunchAgents/com.tonyseek.rsocks.plist  # edit the template
$ launchctl load -w ~/Library/LaunchAgents/com.tonyseek.rsocks.plist

API Overview

There is an example for using API to build a server:

.. code-block:: python

import os

from rsocks.pool import ServerPool
from rsocks.server import ReverseProxyServer

proxy = os.environ.get('SOCKS_PROXY', 'socks5://localhost:1080')
pool = ServerPool()

with pool.new_server(
        name='IMAP',
        server_class=ReverseProxyServer,
        upstream=('imap.gmail.com', 993),
        use_ssl=True) as server:
    server.set_proxy(proxy)
    server.listen(('127.0.0.1', 5993))

with pool.new_server(
        name='SMTP',
        server_class=ReverseProxyServer,
        upstream=('smtp.gmail.com', 465),
        use_ssl=True) as server:
    server.set_proxy(proxy)
    server.listen(('127.0.0.1', 5465))

if __name__ == '__main__':
    pool.loop()
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].