Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VLESS seed configurations #3260

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Add VLESS seed configurations #3260

wants to merge 11 commits into from

Conversation

yuhan6665
Copy link
Member

@yuhan6665 yuhan6665 commented Apr 13, 2024

@RPRX I think it is ready for review now. I still need to do some test, including compatibility.
I feel this code structure is much better than before. Flexible to implement padding, delay and independent scheduler in the future. Although I don't how to design the user config ;) so currently the config is just on/off and actual values are hard coded and features are basic. But I think the concept should be easy to grasp, e.g:

message Addons {
  string Flow = 1;
  bytes Seed = 2;
  SeedMode Mode = 3;
  string Duration = 4;  // "0-8" means apply to number of packets, "1000b-" means start applying once both side exchange 1kb data, counting two-ways
  PaddingConfig Padding = 5;
  DelayConfig Delay = 6;
  SchedulerConfig Scheduler = 7;
}

enum SeedMode {
  Unknown = 0;
  PaddingOnly = 1;
  PaddingPlusDelay = 2;
  IndependentScheduler = 3;
}

message PaddingConfig {
  uint32 RegularMin = 1;
  uint32 RegularMax = 2;
  uint32 LongMin = 3;
  uint32 LongMax = 4;
}

message DelayConfig {
  bool IsRandom = 1;
  uint32 MinMillis = 2;
  uint32 MaxMillis = 3;
}

message SchedulerConfig {
  uint32 TimeoutMillis = 1; // original traffic will not be sent right away but when scheduler want to send or pending buffer times out
  // Other TBD  
}

@yuhan6665 yuhan6665 force-pushed the seed branch 2 times, most recently from c31c74b to 12b1f68 Compare April 14, 2024 03:12
@yuhan6665 yuhan6665 marked this pull request as ready for review April 29, 2024 04:07
@Fangliding
Copy link
Member

在掰扯完http的大小写问题之后我们终于见到一些真家伙了

@RPRX
Copy link
Member

RPRX commented Sep 6, 2024

预计在下个版本中出现,不然下个月现有的 Vision 可能要废了

@RPRX
Copy link
Member

RPRX commented Sep 6, 2024

先 rebase 一下

@yuhan6665
Copy link
Member Author

先 rebase 一下

done

@RPRX
Copy link
Member

RPRX commented Sep 18, 2024

虽然本来想赶在下个月前上 Vision seed 但也不会那么快铺开,所以放下个月,以及 VLESS encryption,这个月我们专注 XHTTP

@RPRX
Copy link
Member

RPRX commented Nov 12, 2024

这个月我们专注 XHTTP

XHTTP 的 XMUX 为我们带来了 h2mux 和 h3mux,且 header 均有 padding 但 body 还没有,所以是时候开搞 Vision Seed 了

@RPRX
Copy link
Member

RPRX commented Nov 17, 2024

To Nikita Korotaev:我觉得现在就不代理 TLSv1.2 有点早,况且 Vision Seed 一个重要目标就是能配合其它传输层使用如 XHTTP,到时内层 TLSv1.3 也无法裸奔,说起来我更关心的是,听说你们俄罗斯那边下个月要断开国际互联网、IP 白名单?

@iambabyninja
Copy link
Member

iambabyninja commented Nov 17, 2024

@RPRX
Since most European countries are unfriendly toward us and cut us off from international transfers (SWIFT), payment systems (Mastercard/Visa), their services (Microsoft, Google, JetBrains, etc.), and many other corporate services, our country has been conducting annual drills for the banking and financial sector for many years.

The goal of these drills is to understand which areas could be affected by such disconnections and what actions should be taken to minimize the impact of these potential disruptions.

For example, in 2012, during one of these drills, we started considering what would happen if we were cut off from Mastercard/Visa. This led to the development of the “МИР” payment system, and as you know, in 2022, we were indeed disconnected from them.

However, these developments have nothing to do with the work of the censor.
This will not affect regular users. These disconnections only concern the corporate environment and are coordinated with them in advance, taking place once a year.

The latest news about the censor’s work is the blocking of ECH.

@yuhan6665
Copy link
Member Author

The latest news about the censor’s work is the blocking of ECH.

Is there more info about this?

@RPRX
Copy link
Member

RPRX commented Nov 18, 2024

The latest news about the censor’s work is the blocking of ECH.

Is there more info about this?

net4people/bbs#417

话说这个 PR 不包含 2d7b0e8 但 test 也炸了,@yuhan6665 有空研究下?

@Fangliding
Copy link
Member

@yuhan6665 It is very easy, they blocked cloudflare-ech.com (plain sni of cloudflare ech)

@yuhan6665
Copy link
Member Author

main 的问题是

=== RUN   Test_maxUpload
...
2024/11/17 12:07:21 [Info] transport/internet/splithttp: Too large upload. scMaxEachPostBytes is set to 100but request had size 101. Adjust scMaxEachPostBytes on the server to be at least as large as client.

@RPRX Seed 是加最后一个 “pingpong” 的时候没改好 我不太确定要不要加最后一个 commit 你先看一下大方向

@RPRX
Copy link
Member

RPRX commented Mar 24, 2025

我的看法是不用和 pb 强耦合,层级不复杂就设计成 ?a=...&b=... 的形式而不是 JSON,服务端下发,客户端发 hash 以供验证

@yuhan6665 先这样改一下,是否裸奔也由参数控制,然后我再确定一下具体的参数名,就可以合并了,下个版本测试

VLESS Addons 第三个大概是 timestamp,配合 VLESS encryption

@RPRX
Copy link
Member

RPRX commented Mar 24, 2025

其实这东西说起来也不复杂,主要就是开放 Vision 的参数允许自定义,拖了一年大概是因为想先把 XHTTP 搞稳定,结果被偷家了

@RPRX
Copy link
Member

RPRX commented Mar 24, 2025

计划是这个版本就 REALITY 抗量子更新 + Vision Seed,下个版本就 ECH + VLESS Encryption,然后 Windows TUN 和 JSON 订阅

搞个无脑的 JSON 订阅给机场和小白用,分流爱好者狂喜,MXGA!

@Meo597
Copy link
Contributor

Meo597 commented Mar 24, 2025

现在订阅一点安全感都没有
能不能借着这个机会升级一下

订阅链接扩展一个preShareKey保护的全新链接
一旦全新链接被访问,旧的直接销毁

既有向前兼容性,也满足更高的安全需求

@RPRX
Copy link
Member

RPRX commented Mar 24, 2025

@Meo597 有点 没看懂

@Meo597
Copy link
Contributor

Meo597 commented Mar 24, 2025

@Meo597 有点 没看懂

用预共享密钥加密整个订阅链接中的内容
每次链接被访问,服务器端给出新的密钥

这样保证链接没被第三方打开过

为了保持良好的向前兼容性,可以做成
常规访问的订阅链接是http://example.com/old-345dfgergertg

里面有个HTTP头,或者是json中的新字段,表明”支持扩展的订阅链接“
http://example.com/new-345dfgergertg

一旦new被访问,old立即作废

@RPRX
Copy link
Member

RPRX commented Mar 24, 2025

现在的订阅不是 Xray 自身的功能,是 GUI 的功能,Xray JSON 订阅的意义就像 XHTTP extra,服务端下发,GUI 基本上不用管里面是什么内容,扔给 Xray 就能用,包括路由、DNS、分片、domain fronting 什么的都在里面,细分的各部分订阅以后也可以安排上

Clash 就是这种,它在机场圈流行无非就是两个字无脑,所以说这东西主要就是给机场用的,你这样不就又弄成个人用的了吗

个人用的话就自建那两三个节点还订阅还分流?不够麻烦的

@Meo597
Copy link
Contributor

Meo597 commented Mar 24, 2025

机场才不在乎订阅有没有被偷,他们反正按流量算钱

我至今仍然手搓配置不用任何面板,源于对订阅链接可能泄露,以及面板们代码质量的的不信任

只是建议,如果想要让core支持订阅,或可加入这个小改动,既能支持所有现有客户端,又可以告诉他们原来订阅链接还有改进空间

因为xraycore的地位,或可推进成为业界标准

就像微软憋不住了做surface,告诉厂商们原来电脑可以这么设计

@simplerick-simplefun
Copy link

@Meo597 有点 没看懂

用预共享密钥加密整个订阅链接中的内容 每次链接被访问,服务器端给出新的密钥

这样保证链接没被第三方打开过

为了保持良好的向前兼容性,可以做成 常规访问的订阅链接是http://example.com/old-345dfgergertg

里面有个HTTP头,或者是json中的新字段,表明”支持扩展的订阅链接“ http://example.com/new-345dfgergertg

一旦new被访问,old立即作废

可能是我不太聪明,没看懂这么做的意义在哪。
我自己手搓了一个简易的订阅系统,客户端通过HTTPS访问链接来获得订阅的config.json,链接PATH包含用户名和密码,服务器接收链接时验证用户名密码。
从信息安全的角度看,HTTPS链接里,域名后面的PATH都是加密传输的,安全性没问题。
如果用户的用户名密码泄露了,那么再怎么搞临时密钥也没用啊。

@wyx2685
Copy link
Contributor

wyx2685 commented Mar 24, 2025

订阅走https已经足够安全了还要干嘛

@Meo597
Copy link
Contributor

Meo597 commented Mar 24, 2025

或者是你通过聊天工具发送,或者是不小心泄露,或者是面板被CSRF
想到想不到的,都有可能导致你订阅链接泄露

这么做的目的,是为了保障你的订阅链接永远不可能被第三方访问
即便泄露了也无所谓

@Meo597
Copy link
Contributor

Meo597 commented Mar 24, 2025

core既然打算要支持订阅,@RPRX 干脆可以教教机场老板和面板们原来可以这么干

@RPRX
Copy link
Member

RPRX commented Mar 25, 2025

上面的 off-topic 了,我看 @yuhan6665 这几天在线,有空根据 #3260 (comment) 改一下吗

@yuhan6665
Copy link
Member Author

上面的 off-topic 了,我看 @yuhan6665 这几天在线,有空根据 #3260 (comment) 改一下吗

你改吧 我可以帮忙测试

@RPRX
Copy link
Member

RPRX commented Mar 25, 2025

好,改个配置格式倒不难,先 rebase 一下吧

@yuhan6665
Copy link
Member Author

有点复杂 周末我看下

@yuhan6665
Copy link
Member Author

rebase 好了

@yuhan6665 yuhan6665 marked this pull request as draft March 29, 2025 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants