diff --git a/CHANGELOG.md b/CHANGELOG.md index f5fe3e1..666201d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 1.2.1 + +- Fix a bug that caused DNS failure when using domain names in the "resolver" option +- Fix a bug where errors in HTTP proxy mode were not logged +- Fix a bug where WeChat protocol was not working properly when obfuscation was not enabled +- New TCP buffer options for tun mode (`tcp_sndbuf`, `tcp_rcvbuf`, `tcp_autotuning`) + ## 1.2.0 - Reworked TUN mode diff --git a/cmd/client_gpl.go b/cmd/client_gpl.go index 7759f2d..7c87ee1 100644 --- a/cmd/client_gpl.go +++ b/cmd/client_gpl.go @@ -4,13 +4,14 @@ package main import ( - "github.com/docker/go-units" - "gvisor.dev/gvisor/pkg/tcpip/transport/tcp" "io" "net" "strings" "time" + "github.com/docker/go-units" + "gvisor.dev/gvisor/pkg/tcpip/transport/tcp" + "github.com/HyNetwork/hysteria/pkg/core" "github.com/HyNetwork/hysteria/pkg/tun" "github.com/sirupsen/logrus" diff --git a/pkg/tun/server.go b/pkg/tun/server.go index afa444d..3ce46f1 100644 --- a/pkg/tun/server.go +++ b/pkg/tun/server.go @@ -5,7 +5,6 @@ package tun import ( "fmt" - "github.com/xjasonlyu/tun2socks/v2/core/option" "net" "os" "os/signal" @@ -13,6 +12,8 @@ import ( "syscall" "time" + "github.com/xjasonlyu/tun2socks/v2/core/option" + "github.com/HyNetwork/hysteria/pkg/core" "github.com/sirupsen/logrus" t2score "github.com/xjasonlyu/tun2socks/v2/core" @@ -66,7 +67,8 @@ func (d *DeviceInfo) Open() (dev device.Device, err error) { } func NewServerWithTunFd(hyClient *core.Client, timeout time.Duration, tunFd int, mtu uint32, - tcpSendBufferSize, tcpReceiveBufferSize int, tcpModerateReceiveBuffer bool) (*Server, error) { + tcpSendBufferSize, tcpReceiveBufferSize int, tcpModerateReceiveBuffer bool, +) (*Server, error) { if mtu == 0 { mtu = MTU } @@ -86,7 +88,8 @@ func NewServerWithTunFd(hyClient *core.Client, timeout time.Duration, tunFd int, } func NewServer(hyClient *core.Client, timeout time.Duration, name string, mtu uint32, - tcpSendBufferSize, tcpReceiveBufferSize int, tcpModerateReceiveBuffer bool) (*Server, error) { + tcpSendBufferSize, tcpReceiveBufferSize int, tcpModerateReceiveBuffer bool, +) (*Server, error) { if mtu == 0 { mtu = MTU }