forward non-HTTP traffic based on host

This commit is contained in:
ginuerzh
2023-01-30 21:09:21 +08:00
parent 3afa3b6860
commit 1c6bc9283e
11 changed files with 127 additions and 13 deletions

View File

@ -6,6 +6,7 @@ import (
"syscall"
limiter "github.com/go-gost/core/limiter/conn"
"github.com/go-gost/core/metadata"
)
var (
@ -41,3 +42,10 @@ func (c *serverConn) Close() error {
c.limiter.Allow(-1)
return c.Conn.Close()
}
func (c *serverConn) Metadata() metadata.Metadata {
if md, ok := c.Conn.(metadata.Metadatable); ok {
return md.Metadata()
}
return nil
}