Open iBug opened 3 years ago
I patched gost locally so ?host=
works for sni://
now. Not yet sure about HTTP proxy.
diff --git a/sni.go b/sni.go
index e57d4a0..a4e00f3 100644
--- a/sni.go
+++ b/sni.go
@@ -103,6 +103,10 @@ func (h *sniHandler) Handle(conn net.Conn) {
conn.RemoteAddr(), conn.LocalAddr(), err)
return
}
+ hosts := h.options.Node.Values["host"]
+ if len(hosts) > 0 {
+ host = hosts[0]
+ }
_, sport, _ := net.SplitHostPort(h.options.Host)
if sport == "" {
Will you add a
?host=
flag for-F http://
proxy forwarding?Expected behavior: Whatever host client requests, gost should send to upstream
CONNECT example.com:443 HTTP/1.1
andHost: example.com:443
and otherwise proxy as usual.Use case: This helps accessing other HTTP sites hosted on the same server, particularly useful for CDNs.