mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-11 17:47:20 +10:00
Add TLS fragment support
This commit is contained in:
@@ -82,6 +82,10 @@ func (ho *HTTPObfs) Write(b []byte) (int, error) {
|
||||
return ho.Conn.Write(b)
|
||||
}
|
||||
|
||||
func (ho *HTTPObfs) Upstream() any {
|
||||
return ho.Conn
|
||||
}
|
||||
|
||||
// NewHTTPObfs return a HTTPObfs
|
||||
func NewHTTPObfs(conn net.Conn, host string, port string) net.Conn {
|
||||
return &HTTPObfs{
|
||||
|
||||
@@ -113,6 +113,10 @@ func (to *TLSObfs) write(b []byte) (int, error) {
|
||||
return len(b), err
|
||||
}
|
||||
|
||||
func (to *TLSObfs) Upstream() any {
|
||||
return to.Conn
|
||||
}
|
||||
|
||||
// NewTLSObfs return a SimpleObfs
|
||||
func NewTLSObfs(conn net.Conn, server string) net.Conn {
|
||||
return &TLSObfs{
|
||||
|
||||
Reference in New Issue
Block a user