Giter VIP home page Giter VIP logo

v2ray-rust's Introduction

v2ray-rust

Rust dependency status License: AGPL v3

An Opinionated Lightweight Implementation of V2Ray, in Rust Programming Language

GUI Support

qv2ray

qv2ray

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 = "cn"
enable_api_server = true
api_server_addr = "127.0.0.1:1999"

[[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/?ed=2048"
tag = "w"

[[direct]]
tag = "d"

[[h2]]
tag = "h2"
hosts = ["example.org"]
path = "/test"

[[grpc]]
tag = "grpc"
host = "127.0.0.1:10002"
service_name = "gungungun"

[[outbounds]]
chain = ["grpc","v"]
#chain = ["h2","v"]
# 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"

[[blackhole]]
tag = "b"


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

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

# [[dokodemo]]
# addr = "127.0.0.1:12345"
# tproxy = true
[[ip_routing_rules]]
tag = "block"
# only block 192.168.0.1 and route 192.168.0.2-192.168.0.254 to other outbounds
cidr_rules = ["192.168.0.1/32"]

[[domain_routing_rules]]
tag = "block"
domain_rules = ["baidu.com"]


# If file path is not provided,
# v2ray-rs will read env varaiable `v2ray.location.asset` or `V2RAY_LOCATION_ASSET` or current exe dir
[[geosite_rules]]
tag = "cn"
# file_path = "your_custom_geosite_file_path"
rules = ["cn"]

# If file path is not provided,
# v2ray-rs will read env varaiable `v2ray.location.asset` or `V2RAY_LOCATION_ASSET` or current exe dir
[[geoip_rules]]
tag = "cn"
# file_path = "your_custom_geoip_file_path"
rules = ["cn"]

# If file path is not provided,
# v2ray-rs will read env varaiable `v2ray.location.asset` or `V2RAY_LOCATION_ASSET` or current exe dir
[[geoip_rules]]
tag="private"
# file_path = "your_custom_geoip_file_path"
rules = ["private"]


[[outbounds]]
chain = ["b"]
tag = "block"

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

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
  • ✅ 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
  • ✅ gRPC
  • ❌ QUIC
  • ❌ DomainSocket
  • ❌ mKCP

Router

  • ✅ geosite
  • ✅ geoip

v2ray-rust's People

Contributors

darsvador avatar dependabot[bot] avatar ducksoft avatar johnshall avatar moodyhunter avatar zedifen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

v2ray-rust's Issues

请问怎样编译arm

我将target改为arm-unknown-linux-gnueabi

会显示
^^^^^ not found in cpu::arm

no utls?

[[inbounds]]
addr = '0.0.0.0:12333'
tag = 'http-in-1'

[[inbounds]]
addr = '0.0.0.0:1089'
enable_udp = true
tag = 'socks-in-1'

[[outbounds]]
chain = [ 'sni', 'trojan' ]
tag = 'Default'

[[tls]]
sni = 'yoursni.com'
tag = 'sni'

[[trojan]]
addr = 'example.com:443'
password = 'example_password'
tag = "trojan"

my test result:
https://tlsfingerprint.io/id/9c673fd64a32c8dc

交叉编译x86的openwrt程序错误

` cargo:rustc-link-lib=static=crypto
cargo:rustc-link-lib=static=ssl
cargo:rerun-if-env-changed=BORING_BSSL_INCLUDE_PATH

--- stderr
deps/boringssl/src/include/openssl/base.h:59:10: fatal error: 'stddef.h' file not found
thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("deps/boringssl/src/include/openssl/base.h:59:10: fatal error: 'stddef.h' file not found\n")', /home/sda3/openwrt/staging_dir/hostpkg/cargo/registry/src/github.com-1ecc6299db9ec823/boring-sys-2.1.0/build.rs:457:39

是否缺少某个依赖?之前已安装libclang-dev

`struct Inbounds` for server

I see struct Inbounds only contains addr now, I guess it is for http/socks5 inbounds of the client.
How about adding some proxy config like TrojanConfig to Inbounds? Just a suggestion.

Doesn't compile on aarch64 macOS

Hello,

I tried to compile this project on macOS (aarch64 Ventura 13.4, rustc 1.70.0 (90c541806 2023-05-31)).

It seems like there's an issue with the boring-sys crate. I get an issue at compile time. Am I missing some build dependencies, or is this a bug with the boring-sys crate?

I also tried to add openssl to the PATH by doing this

Error message:

--- stdout
  cargo:rerun-if-env-changed=BORING_BSSL_PATH
  CMAKE_TOOLCHAIN_FILE_aarch64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_aarch64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_aarch64-apple-darwin = None
  CMAKE_GENERATOR_aarch64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_aarch64-apple-darwin = None
  CMAKE_PREFIX_PATH_aarch64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_aarch64-apple-darwin = None
  CMAKE_aarch64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/Users/leana/repos/leana/v2ray-rust/
  ...
--- stderr
  thread 'main' panicked at '"enum_(unnamed_at_deps/boringssl/src/include/openssl/err_h_291_1)" is not a valid Ident', /Users/leana/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.54/src/fallback.rs:811:9
  note: run with `RUST_BACKTRACE=1` environment variable to display ...

Thanks ! Really appreciate the project :)

--- Chinese below ---
嗨,

我剛試著在 macOS (aarch64 Ventura 13.4, rustc 1.70.0 (90c541806 2023-05-31)) 上編譯但是 boring-sys 編譯失敗了。
請問我是不是少了什麼 library ? 還是這其實是 boring-sys 的問題呢?

我有試過把 openssl library 放到 path 裡

錯誤訊息同上。

謝謝!

We need You!

This is expected to be a huge project. We're in great need of more experts on related fields.
Feel free to leave comments down here!

How about update the ssl fingerpoint with time?

Dear developers,
Hello!
I have read 35cce0f and in this commit we resistance the ClientHello fingerprinting by imitating a certion version of chromium tls fingerprint. With the time went by and the updating of chromeium, It could be detected as a fingerprint of v2ray-rust.
Therefore, we could change SSLVersion,Cipher,SSLExtension,EllipticCurve,EllipticCurvePointFormat by workflow to update them with the newest chromium.
I think it could be helpful. Thanks for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.