mirror of
https://github.com/ginuerzh/gost.git
synced 2024-04-21 12:31:34 +00:00
change SNI obfuscation
This commit is contained in:
@@ -135,12 +135,9 @@ func (h *httpHandler) Handle(conn net.Conn) {
|
||||
}
|
||||
|
||||
// try to get the actual host.
|
||||
if req.Host != "" {
|
||||
if index := strings.IndexByte(req.Host, '.'); index > 0 {
|
||||
// try to decode the prefix
|
||||
if name, err := decodeServerName(req.Host[:index]); err == nil {
|
||||
req.Host = name
|
||||
}
|
||||
if v := req.Header.Get("Gost-Target"); v != "" {
|
||||
if host, err := decodeServerName(v); err == nil {
|
||||
req.Host = host
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user