forward non-HTTP traffic based on host
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user