ws.go 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. /*Package websocket implements Websocket transport
  2. Websocket transport implements a HTTP(S) compliable, surveillance proof transport method with plausible deniability.
  3. To configure such a listener, set streamSettings to be ws. A http(s) listener will be listening at the port you have configured.
  4. There is additional configure can be made at transport configure.
  5. "wsSettings":{
  6. "Path":"ws", // the path our ws handler bind
  7. "Pto": "wss/ws", // the transport protocol we are using ws or wss(listen ws with tls)
  8. "Cert":"cert.pem", // if you have configured to use wss, configure your cert here
  9. "PrivKey":"priv.pem" //if you have configured to use wss, configure your privatekey here
  10. }
  11. To configure such a Dialer, set streamSettings to be ws.
  12. There is additional configure can be made at transport configure.
  13. "wsSettings":{
  14. "Path":"ws", // the path our ws handler bind
  15. "Pto": "wss/ws", // the transport protocol we are using ws or wss(listen ws with tls)
  16. }
  17. It is worth noting that accepting a non-valid cert is not supported as a self-signed or invalid cert can be a sign of a website that is not correctly configured and lead to additional investigation.
  18. This transport was disscussed at
  19. https://github.com/v2ray/v2ray-core/issues/224
  20. */
  21. package websocket