feat: support tuic v5 (#176)

This commit is contained in:
mzz
2023-07-08 22:07:32 +08:00
committed by GitHub
parent b8660fdfd2
commit b82b31e350
7 changed files with 203 additions and 63 deletions

View File

@ -94,7 +94,9 @@ destRetrieved:
if err = RelayTCP(sniffer, rConn); err != nil {
switch {
case strings.HasSuffix(err.Error(), "write: broken pipe"),
strings.HasSuffix(err.Error(), "i/o timeout"):
strings.HasSuffix(err.Error(), "i/o timeout"),
strings.HasSuffix(err.Error(), "canceled by local with error code 0"),
strings.HasSuffix(err.Error(), "canceled by remote with error code 0"):
return nil // ignore
default:
return fmt.Errorf("handleTCP relay error: %w", err)