Portan / v2ray-rust

An Opinionated Lightweight Implementation of V2Ray, in Rust Programming Language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

v2ray-rust

Rust

An Opinionated Lightweight Implementation of V2Ray, in Rust Programming Language

Features

  • Proxy chains
  • Full Cone UDP for Shadowsocks/Trojan/Direct
  • Fast route algorithm
    • Hybrid/Mph Domain matcher
    • Longest prefix match for CIDR route
  • ClientHello fingerprinting resistance
  • Easy configuration

Config example

default_outbound = "proxy"

[[ss]]
addr = "127.0.0.1:9000"
password = "123456"
method = "chacha20-poly1305"
tag = "ss0"
[[ss]]
addr = "127.0.0.1:9001"
password = "123456"
method = "chacha20-poly1305"
tag = "ss1"
[[ss]]
addr = "127.0.0.1:9002"
password = "123456"
method = "chacha20-poly1305"
tag = "ss2"
[[ss]]
addr = "127.0.0.1:9004"
password = "123456"
method = "chacha20-poly1305"
tag = "ss3"

[[vmess]]
addr = "127.0.0.1:10002"
uuid = "b831381d-6324-4d53-ad4f-8cda48b30811"
method = "aes-128-gcm"
tag = "v"

[[trojan]]
addr = "127.0.0.1:10003"
password = "password"
tag = "t"

[[ws]]
uri = "ws://127.0.0.1:10002/"
tag = "w"

[[direct]]
tag = "d"

[[outbounds]]
chain = ["ss0","ss1","ss2","ss3"]
tag = "proxy"

[[outbounds]]
chain = ["w","v","ss0","ss1"]
# chain = ["w","v","ss2"]
# chain = ["t","w","v"]
# chain = ["ss0","ss1","ss2","ss3"]
# chain = ["ss0","ss1","ss2","ss3","w","v"]
# chain = ["ss0"]
# debug
tag = "cn"

[[outbounds]]
chain = ["d"]
tag = "private"

[[inbounds]]
addr = "127.0.0.1:1087"
enable_udp = true

# [[dokodemo]]
# addr = "127.0.0.1:12345"
# tproxy = true

[[geosite_rules]]
tag = "cn"
file_path = "/usr/share/v2ray/geosite.dat"
rules = ["cn"]

[[geoip_rules]]
tag = "cn"
file_path = "/usr/share/v2ray/geoip.dat"
rules = ["cn"]

[[geoip_rules]]
tag="private"
file_path = "/usr/share/v2ray/geoip.dat"
rules = ["private"]

Roadmap

🚧 Interested but not implemented yet βœ… Implemented ❌ Not Interested πŸ€”

geosite fast matcher

geoip fast matcher

Rust generator

socks5

  • βœ… socks5 Inbound
  • βœ… UDP support

http

  • βœ… http Inbound
    • 🚧 RFC 7230
  • βœ… mixed Inbound

Vmess

  • βœ… Vmess Aead Outbound
  • βœ… UDP support

Shadowsocks

  • βœ… Shadowsocks Outbound
  • βœ… UDP support

Trojan

  • βœ… Trojan
  • βœ… UDP support

VLESS

  • ❌

Chainable Steam

  • βœ…

Chainable UDP

  • βœ…

Stream settings

  • βœ… TLS
  • βœ… HTTP/2
  • βœ… WebSocket
  • βœ… WebSocket-0-rtt
  • ❌ QUIC
  • ❌ DomainSocket
  • ❌ mKCP

Router

  • βœ… geosite
  • βœ… geoip

About

An Opinionated Lightweight Implementation of V2Ray, in Rust Programming Language

License:GNU Affero General Public License v3.0


Languages

Language:Rust 100.0%