feat: hysteria2 x-forward
This commit is contained in:
9 files changed
+54
-6
No files matched your search
@@ -468,8 +468,10 @@ class RoundTripTests(unittest.TestCase):
|
||||
self.assertEqual(stream["hysteriaSettings"]["masquerade"],
|
||||
{"type": "proxy", "url": "https://www.example.com", "rewriteHost": True})
|
||||
# This host's own web server: the name the client asked for goes on to it.
|
||||
own = render_xray_inbound(dict(spec, hysteria={"masquerade": "https://www.example.com", "rewriteHost": False}))
|
||||
self.assertFalse(own["streamSettings"]["hysteriaSettings"]["masquerade"]["rewriteHost"])
|
||||
own = render_xray_inbound(dict(spec, hysteria={"masquerade": "https://www.example.com", "rewriteHost": False,
|
||||
"xForwarded": True}))
|
||||
self.assertEqual(own["streamSettings"]["hysteriaSettings"]["masquerade"],
|
||||
{"type": "proxy", "url": "https://www.example.com", "rewriteHost": False, "xForwarded": True})
|
||||
link = build_share_link(spec, "vpn.example.com")
|
||||
self.assertTrue(link.startswith("hysteria2://p%40ss%2Fword@vpn.example.com:8443?"), link)
|
||||
self.assertEqual(link_params(link)["alpn"], "h3")
|
||||
|
||||
Reference in new issue
Block a user