Skip to content

Commit 3ad3ef0

Browse files
committed
add http stream
1 parent 29344bc commit 3ad3ef0

23 files changed

+665
-63
lines changed

Cargo.lock

+266
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name = "xray-rust"
33
version = "0.1.0"
44
edition = "2021"
55

6+
[build]
7+
jobs = 20 # 并行构建任务的数量,默认等于 CPU 的核心数
8+
incremental = true # 是否开启增量编译
9+
10+
611
[dependencies]
712
clap = "4.4.10"
813
config = "0.14.0"
@@ -16,3 +21,6 @@ tokio = { version = "1.37.0", features = ["full"] }
1621
rustc_version = "0.4.0"
1722
signal-hook = "0.3.17"
1823
bytes = "1.6.0"
24+
hyper = { version = "1", features = ["full"] }
25+
hyper-util = { version = "0.1", features = ["full"] }
26+
http-body-util = "0.1"

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
### xray-rust
22

3-
use rust to write xray and add some new feature: such as read config dynamic, use less memory
3+
use rust to write xray and add some new feature: such as read config dynamic, use less memory
4+
5+
6+
xray 只定义 server 和 client 的接口,具体实现方式由不同类型的 stream 进行实现;
7+
关于负载均衡?应该实现单downstream对应多upstream,这里lb的实现需要注入meteri进行测算;配置文件是否需要实现golang中viper那种动态下发?
8+
如何利用cdn,upstream是否需要实现多路复用,是否需要对流量进行压缩?对端服务器是否需要实现xray中的回落?
9+
客户端中dns请求是否需要实现 fake dns,或者直接交由系统实现?是否需要实现流量统计?
10+
入站流量染色?还是基于某种规则进行路由?过滤?或者拦截?
11+
例如:常常访问微软,但是分为国内国外流量,有时间会被重新定向到国外网站,所以需要将一个网页内的请求拆分出来,分别进行处理。

0 commit comments

Comments
 (0)