All Projects → NOBLES5E → Cproxy

NOBLES5E / Cproxy

Licence: agpl-3.0
Easy per application transparent proxy built on cgroup.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Cproxy

Asuswrt Merlin Transparent Proxy
transparent proxy base on ss, v2ray, ipset, iptables, chinadns on asuswrt merlin.
Stars: ✭ 367 (+153.1%)
Mutual labels:  proxy, shadowsocks, v2ray, transparent-proxy
Ssr Accounts
V2Ray, 免费V2Ray账号分享, 翻墙,无界, 自由门, SquirrelVPN, SS账号, 机场
Stars: ✭ 3,854 (+2557.93%)
Mutual labels:  proxy, shadowsocks, v2ray
V2ray Core
A platform for building proxies to bypass network restrictions.
Stars: ✭ 38,782 (+26646.21%)
Mutual labels:  proxy, shadowsocks, v2ray
Awesome Network Stuff
Resources about network security, including: Proxy/GFW/ReverseProxy/Tunnel/VPN/Tor/I2P, and MiTM/PortKnocking/NetworkSniff/NetworkAnalysis/etc。More than 1700 open source tools for now. Post incoming.
Stars: ✭ 578 (+298.62%)
Mutual labels:  proxy, shadowsocks, v2ray
Winxray
Xray / V2Ray( vmess/vless )、Shadowsocks、Trojan 通用客户端(Windows),可自动维持稳定上网 - 代理服务器异常自动切换,并提供一键部署代理服务端工具,使用 aardio 编写,绿色便携版免安装仅740KB、不需要.Net等外部运行库。
Stars: ✭ 241 (+66.21%)
Mutual labels:  proxy, shadowsocks, v2ray
V2ray Rules Dat
🦄 🎃 👻 V2Ray 路由规则文件加强版,可代替 V2Ray 官方 geoip.dat 和 geosite.dat,兼容 Shadowsocks-windows、Xray-core、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, compatible with Xray-core, Shadowsocks-windows, Trojan-Go and leaf.
Stars: ✭ 6,550 (+4417.24%)
Mutual labels:  proxy, shadowsocks, v2ray
Dosvpn
🚀 极速、简单、开源的 VPN 访问外网学习先进科学技术的必备工具
Stars: ✭ 485 (+234.48%)
Mutual labels:  proxy, shadowsocks, v2ray
Fanqiang
翻墙-科学上网
Stars: ✭ 23,428 (+16057.24%)
Mutual labels:  proxy, shadowsocks, v2ray
Clash Rules
🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 客户端。
Stars: ✭ 706 (+386.9%)
Mutual labels:  proxy, shadowsocks, v2ray
Fanqiang Book
2021科学上网指南,小白图文攻略 | 翻墙/梯子/自由上网/SSR/V2Ray/
Stars: ✭ 127 (-12.41%)
Mutual labels:  proxy, shadowsocks, v2ray
Freess
免费ss账号 免费shadowsocks账号 免费v2ray账号 (长期更新)
Stars: ✭ 6,544 (+4413.1%)
Mutual labels:  proxy, shadowsocks, v2ray
Proxysu
Xray,V2ray,Trojan,NaiveProxy, Trojan-Go, ShadowsocksR(SSR),Shadowsocks-libev及相关插件,MTProto+TLS 一键安装工具,windows下用(一键科学上网)
Stars: ✭ 3,309 (+2182.07%)
Mutual labels:  proxy, shadowsocks, v2ray
Awesome Vpn
Free VPN/proxy,server,account,link list.,实时更新免费的代理,科学上网,翻墙,梯子,服务器,客户端,账号
Stars: ✭ 2,691 (+1755.86%)
Mutual labels:  proxy, shadowsocks, v2ray
V2ray Core
A platform for building proxies to bypass network restrictions.
Stars: ✭ 13,438 (+9167.59%)
Mutual labels:  proxy, shadowsocks, v2ray
Surge Rules
🦄 🎃 👻 Surge 规则集(DOMAIN-SET 和 RULE-SET),兼容 Surge for iOS 和 Surge for Mac 客户端。
Stars: ✭ 151 (+4.14%)
Mutual labels:  proxy, shadowsocks, v2ray
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (+304.83%)
Mutual labels:  proxy, shadowsocks, v2ray
New Pac
翻墙-科学上网、免费翻墙、免费科学上网、免费自由上网、fanqiang、翻墙梯子、免费软件/方法,一键翻墙浏览器,免费shadowsocks/ss/ssr/v2ray/goflyway账号/节点分享,vps一键搭建翻墙服务器脚本/教程,电脑、手机、iOS、安卓、windows、Mac、Linux、路由器翻墙
Stars: ✭ 31,869 (+21878.62%)
Mutual labels:  proxy, shadowsocks, v2ray
Free proxy ss
分享来自互联网上免费的shadowsocks(SS)/ShadowsocksR(SSR)/V2ray(vmess)代理 每15分钟更新一次,每次各分享4个临时可用代理。 及时订阅、及时更新。
Stars: ✭ 72 (-50.34%)
Mutual labels:  proxy, shadowsocks, v2ray
Ss Tproxy
搭建 SS/SSR/V2Ray/Socks5 透明代理环境的简易脚本
Stars: ✭ 1,561 (+976.55%)
Mutual labels:  v2ray, transparent-proxy
Breaking Gfw Book
整理所有的翻墙方法,持续更新....欢迎PR
Stars: ✭ 105 (-27.59%)
Mutual labels:  shadowsocks, v2ray

cproxy

Continuous integration

cproxy can redirect TCP and UDP traffic made by a program to a proxy, without requiring the program supporting a proxy.

What you can achieve with cproxy: All the things listed on for example V2Ray Guide, including advanced configurations like reverse porxy for NAT traversal, and you can apply different proxy on different applications.

Compared to many existing complicated transparent proxy setup, cproxy usage is as easy as proxychains, but unlike proxychains, it works on any program (including static linked Go programs) and redirects DNS requests.

Note: The proxy used by cproxy should be a transparent proxy port (such as V2Ray's dokodemo-door inbound and shadowsocks ss-redir). A good news is that even if you only have a SOCKS5 or HTTP proxy, there are tools that can convert it to a transparent proxy for you (for example, transocks, ipt2socks and ip2socks-go).

Installation

You can install by downloading the binary from the release page or install with cargo:

cargo install cproxy

Usage

Simple usage: just like proxychains

You can launch a new program with cproxy with:

cproxy --port <destination-local-port> -- <your-program> --arg1 --arg2 ...

All TCP connections and DNS requests will be proxied. In this case, your local transparent proxy should support DNS address overriding to make DNS requests redirection work properly. For an example setup, see wiki. If you don't want to proxy DNS requests, run with

cproxy --port <destination-local-port> --no-dns -- <your-program> --arg1 --arg2 ...

Simple usage: use iptables tproxy

If your system support tproxy, you can use tproxy with --use-tproxy flag:

cproxy --port <destination-local-port> --use-tproxy -- <your-program> --arg1 --arg2 ...
# or for existing process
cproxy --port <destination-local-port> --use-tproxy --pid <existing-process-pid>

With --use-tproxy, there are several differences:

  • All UDP traffic are proxied instead of only DNS UDP traffic to port 53.
  • Your V2Ray or shadowsocks service should have tproxy enabled on the inbound port. For V2Ray, you need "tproxy": "tproxy" as in V2Ray Documentation. For shadowsocks, you need -u as shown in shadowsocks manpage.

An example setup can be found here.

Note that when you are using the tproxy mode, you can override the DNS server address with cproxy --use-tproxy --override-dns <your-dns-server-addr> .... This is useful when you want to use a different DNS server for a specific application.

Advanced usage: proxy an existing process

With cproxy, you can even proxy an existing process. This is very handy when you want to proxy existing system services such as docker. To do this, just run

cproxy --port <destination-local-port> --pid <existing-process-pid>

The target process will be proxied as long as this cproxy command is running. You can press Ctrl-C to stop proxying.

How does it work?

cproxy creates a unique cgroup for the proxied program, and redirect its traffic with packet rules.

Limitations

  • cproxy requires sudo and root access to modify cgroup.
  • Currently only tested on Linux.

Similar projects

There are some awesome existing work:

  • graftcp: work on most programs, but cannot proxy UDP (such as DNS) requests. graftcp also has performance hit on the underlying program, since it uses ptrace.
  • proxychains: easy to use, but not working on static linked programs (such as Go programs).
  • proxychains-ng: similar to proxychains.
  • cgproxy: cgproxy also uses cgroup to do transparent proxy, and the idea is similar to cproxy's. There are some differences in UX and system requirements:
    • cgproxy requires system cgroup v2 support, while cproxy requires v1.
    • cgproxy requires a background daemon process cgproxyd running, while cproxy does not.
    • cgproxy requires tproxy, which is optional in cproxy.
    • cgproxy can be used to do global proxy, while cproxy does not intended to support global proxy.
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].