Planning icon indicating copy to clipboard operation
Planning copied to clipboard

Proposal: Standard of URL Scheme for VMess Configurations

Open xfoxfu opened this issue 8 years ago • 6 comments

Background

Currently, different v2ray clients use various formats of vmess:// URL scheme, which caused a lot confusion and incompatibility. It is suggested to provide a standard of vmess:// URL scheme, like Shadowsocks SIP002, in order to enhance exchange of configurations, thus simplify the configuration process. Additionally, it is better to have only connection-related informations in the standard, as most v2ray users may configure routing and other stuffs on their own.

Standard

URI = "vmess://" + userInfo + "@" + host + ":" + port + ["/"] + urlParams
userInfo = websafe-base64-encode-utf8(uid  ":" alterId)

if alterId = 0, it can be omitted with its leading colon before encode.

URL Params

name description
network tcp/kcp/ws
tcpHeader tcp header in JSON
kcp* kcp configurations
kcpHeaderType kcp header type
wsPath WebSocket Path
wsHost WebSocket Host
wsHeaders WebSocket Headers in JSON
tls 0/1, 0 for false and 1 for true
tlsServerName TLS server name
tlsAllowInsecure 0/1, 0 for false and 1 for true

xfoxfu avatar Jan 30 '18 05:01 xfoxfu

Please clarify the purpose of doing so.

I'd imagine the URI end up being very long, and nobody can verify it by human eye. If everyone simply copy/paste the URIs and verify them by V2Ray engine, it doesn't matter whether the information is in the form of URI or JSON.

DarienRaymond avatar Jan 30 '18 19:01 DarienRaymond

For exchanging only the connection details of the VMess protocol.

xfoxfu avatar Jan 30 '18 23:01 xfoxfu

As I said, URI doesn't bring much benefit compared with JSON. To exchange connection details, one should use JSON or even better with protobuf.

DarienRaymond avatar Jan 31 '18 10:01 DarienRaymond

But with URI, one can invoke the client instantly, which is more simple than copying and pasting the JSON.

xfoxfu avatar Jan 31 '18 11:01 xfoxfu

And infact most clients have their own URI implementions with different standards, so IMO giving an official standard of URI would be better for compatibility.

xfoxfu avatar Jan 31 '18 11:01 xfoxfu

V2Ray doesn't want to maintain such standard for now. If you are the owner of a client, feel free to create one for your application.

DarienRaymond avatar Jan 31 '18 20:01 DarienRaymond