- Network: Layer 3 IP tunnel over QUIC with TUN interfaces and IP pool - FileMask: new noise/obfuscation layer masking traffic as encrypted file downloads - Hysteria outbound: chain Hysteria servers via pluggable outbound
37 lines
585 B
Go
37 lines
585 B
Go
package network
|
|
|
|
import (
|
|
"crypto/tls"
|
|
"time"
|
|
)
|
|
|
|
const (
|
|
defaultNetworkListen = ":5199"
|
|
defaultTUNName = "hynt0"
|
|
defaultTUNMTU = 1400
|
|
defaultPoolCIDR = "10.10.0.0/24"
|
|
defaultKeepalive = 30 * time.Second
|
|
readBufferSize = 65535
|
|
)
|
|
|
|
type Config struct {
|
|
Enabled bool
|
|
Listen string
|
|
Token string
|
|
TUN TUNConfig
|
|
Pool string
|
|
Keepalive time.Duration
|
|
TLS *tls.Config
|
|
Upstream *UpstreamConfig
|
|
}
|
|
|
|
type TUNConfig struct {
|
|
Name string
|
|
MTU int
|
|
}
|
|
|
|
type UpstreamConfig struct {
|
|
Server string
|
|
Token string
|
|
TLS *tls.Config
|
|
}
|