-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Propose a standardized vmess:// URI scheme following RFC3986 #1487
Comments
支持标准化vmess://但是反对后面那些
|
I agree that we really should have a standard and officially recommended I notice one problem of your scheme above @Cenmrev. In principle the query string should not contain hierarchical data (RFC3986 3.4.Query). For example, if we parse the example above back, we will get {
"sendThrough": "0.0.0.0",
"mux": "enabled": "false",
"concurrency": "8",
"streamSettings": "quicSettings": "key": "abcde",
"header": "type": "dtls",
"security": "chacha20-poly1305",
"security": "none",
"network": "quic"
} which is NOT the original data. I suggest that we also encode the json into base64 codes and the above example will be
where the {
"sendThrough": "0.0.0.0",
"mux": {
"enabled": false,
"concurrency": 8
},
"streamSettings": {
"quicSettings": {
"key": "abcde",
"header": {
"type": "dtls"
},
"security": "chacha20-poly1305"
},
"security": "none",
"network": "quic"
}
} or we can URL-encode the JSON string, see https://stackoverflow.com/questions/15872658/standardized-way-to-serialize-json-to-query-string. Either way should be OK. |
@society765 Thanks for the suggestions. I did not notice this severe problem. I think the form of |
10天过去了,看来这个提案又一次落空了。 |
I second the idea by @society765. I will provide a detailed design later. Please stay tuned. |
Suggestion: use gzip compress the config file of v2ray, and then base64, could get about 1k bytes URI, and lose none details, easy to run as CLI parameter. Got smart brains to more valuable things~ |
Actually, I have tried to compress the entire configuration file, but I found this method worthless. |
其实分享的目的主要是给多人使用 |
复杂也要看数据量,config file 以 gzip压缩后再base64得到1k到2k左右字节,是二维码能容忍的最大数据量50%左右,技术标准上是安全的。 |
2018.12.25 - 2019.02.22 = 59 |
Closing in favor of #1569 |
As the developer of clients V2RayX and V2RayW, here I sincerely propose a
standardized
vmess://
URI scheme such that users can share and configure server information more easily and different developers can save time on parsingdifferent share links as there have already been different types of vmess://
URI schemes and not all of them are compatible with each other. Please see issue #174 and issue #185.
Inspired by SIP002 URI Scheme and Following RFC3986,
where
UserObject
)OutboundObject
, white space should be escapedOutboundObject
exceptproxySettings
, encoded as a query stringFor example, if we have an OutboundObject of vmess protocol like this
The corresponding URI would be:
where
eyJpZCI6IjIzYWQ2YjEwLThkMWEtNDBmNy04YWQwLWUzZTM1Y2QzODI1NyIsImFsdGVySWQiOjY0LCJzZWN1cml0eSI6ImF1dG8iLCJsZXZlbCI6MH0=
is base64 encodesendThrough=0.0.0.0&mux=enabled=false&concurrency=8&streamSettings=quicSettings=key=abcde&header=type=dtls&security=chacha20-poly1305&security=none&network=quic#my%20server
is converted fromThis includes all possible information in a complete OutboundObject of vmess protocol except "proxySettings". Some details:
proxySettings
because this is related to routing, different users have their own routing rules.vnext
in a single URI, because it is not guaranteed that differentvnext
servers share the samestreamSettings
.I see some previous discussions on this topic, like #279, #1392, #1139, but seems there no solutions yet. I understand that the purpose of Project V is to build a unified platform and only including outbound information in the URI scheme makes the powerful routing function lost. To solve this issue, we can later scandalize a scheme like
v2ray://
or use other methods(but personally sharing the whole config.json should be the best answer). But can we just take one small step forward to solve the issue ofvmess://
?I also understand that this scheme is not related to the function of v2ray-core. But without an official standard, the fact is what I mentioned in the beginning: there have already been different types of vmess://
URI schemes and not all of them are compatible with each other.
This is just my proposal and more details may need further discussions. What I really want is that vmess can have an official and standardized URI scheme to be posted on v2ray.com so that every client developer and vmess service provider can follow and further we can generate corresponding QR codes.
Edit:
The scheme above has a severe problem. I think @society765 's suggestions is better: #1487 (comment)
The text was updated successfully, but these errors were encountered: