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

Websocket Early Data and Browser forwarder Improvement #818

Merged
merged 17 commits into from
Apr 1, 2021

Conversation

xiaokangwang
Copy link
Contributor

This is a improvement of Web-Sockets transport that allow WebSocket connection to send early data in path, which reduce the WebSocket's connection establishment time, and browser forward, which will use any browser's WebSocket framework to automatically relay the traffic, which will have the same TLS fingerprint as browser initialized WSS traffic.

@RPRX 已经要求我不能早于其发布此改进。

@xiaokangwang
Copy link
Contributor Author

browser forwarder config: set this at root configure document

{
  "browserForwarder": {
    "listenAddr": "127.0.0.1",
    "listenPort": 1922
  }
}

@xiaokangwang
Copy link
Contributor Author

xiaokangwang commented Mar 23, 2021

websocket setting:
maxEarlyData = enable 0rtt early data
useBrowserForwarding = enable client browser forwarding(server-side support will be enabled automatically)

      "streamSettings": {
        "network": "ws",
        "security": "none",
        "wsSettings": {
          "path": "/",
          "maxEarlyData": 1024,
          "useBrowserForwarding": true 
        },
        "tlsSettings": {
          "allowInsecure": false
        }
      }

@rurirei
Copy link
Contributor

rurirei commented Mar 23, 2021

i do not liked on near changes that add new Object at root configuration: FakeDNSObject and BrowserForwarderObject, as this break the past infrastructure of v2ray root configuration: log, dns, inbounds, outbounds, routing, etc. could you move these?

@xiaokangwang
Copy link
Contributor Author

i do not liked on near changes that add new Object at root configuration: FakeDNSObject and BrowserForwarderObject, as this break the past infrastructure of v2ray root configuration: log, dns, inbounds, outbounds, routing, etc. could you move these?

I have to say that, FakeDNS, BrowserForwarder are top level component of V2Ray instance, and it is most trivial to put them in the root document.

What kind of change would you suggest to make?

@rurirei
Copy link
Contributor

rurirei commented Mar 25, 2021

@xiaokangwang like this.

{
  "common": {
     "fakedns": {},
     "browserforwarder": {}
  }
}

@xiaokangwang
Copy link
Contributor Author

@xiaokangwang like this.

{
  "common": {
     "fakedns": {},
     "browserforwarder": {}
  }
}

Still waiting for opinion from @kslr

@Loyalsoldier
Copy link
Contributor

@xiaokangwang
Copy link
Contributor Author

It seems there is an issue about safety: https://github.com/v2fly/v2ray-core/pull/818/checks?check_run_id=2210672378

I believe there is a check below that discard any unrecognized user supplied value.

@xiaokangwang xiaokangwang merged commit 03077a4 into master Apr 1, 2021
@Loyalsoldier Loyalsoldier deleted the dev-wsimprovement branch April 2, 2021 13:48
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.

3 participants