mirror of
https://github.com/go-i2p/go-i2ptunnel.git
synced 2025-12-20 15:15:52 -05:00
Set a lower max packet size
This commit is contained in:
@@ -5,16 +5,16 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
|
||||
"github.com/go-i2p/go-forward/config"
|
||||
"github.com/go-i2p/go-forward/packet"
|
||||
"github.com/go-i2p/go-forward/stream"
|
||||
udpconst "github.com/go-i2p/go-i2ptunnel/lib/udp/const"
|
||||
"github.com/go-i2p/i2pkeys"
|
||||
"github.com/txthinking/socks5"
|
||||
)
|
||||
|
||||
var (
|
||||
socksHandler socks5.Handler = &SOCKS{}
|
||||
forwardConfig = config.DefaultConfig()
|
||||
forwardConfig = udpconst.DatagramForwardConfig
|
||||
)
|
||||
|
||||
// TCPHandle implements socks5.Handler.
|
||||
|
||||
15
lib/udp/const/const.go
Normal file
15
lib/udp/const/const.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package udpconst
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/go-i2p/go-forward/config"
|
||||
)
|
||||
|
||||
var DatagramForwardConfig = &config.ForwardConfig{
|
||||
BufferSize: 32 * 1024, // 32KB buffer
|
||||
IdleTimeout: 30 * time.Second,
|
||||
MaxPacketSize: 65507 / 6, // Max UDP packet size
|
||||
EnableMetrics: true,
|
||||
ShutdownSignal: make(chan struct{}),
|
||||
}
|
||||
Reference in New Issue
Block a user