Add udp over tcp support for shadowsocks-2022

This commit is contained in:
世界 2022-06-01 11:12:43 +08:00
parent 6f93ef7736
commit c3505632fd
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
14 changed files with 119 additions and 33 deletions

View file

@ -3,10 +3,10 @@
package shadowsocks_2022
import (
"errors"
"io"
B "github.com/sagernet/sing/common/buf"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/metadata"
"github.com/xtls/xray-core/common/buf"
"github.com/xtls/xray-core/common/net"
@ -140,7 +140,7 @@ func (w *packetConnWrapper) Close() error {
}
func returnError(err error) error {
if errors.Is(err, io.EOF) {
if E.IsClosed(err) {
return nil
}
return err