V2bX/core/hy/config.go
yuzuki999 42bb7bc90f update
initial support for hysteria
update config
update api
change user email format
...
2023-06-08 22:46:33 +08:00

27 lines
573 B
Go

package hy
const (
mbpsToBps = 125000
minSpeedBPS = 16384
DefaultALPN = "hysteria"
DefaultStreamReceiveWindow = 16777216 // 16 MB
DefaultConnectionReceiveWindow = DefaultStreamReceiveWindow * 5 / 2 // 40 MB
DefaultMaxIncomingStreams = 1024
DefaultMMDBFilename = "GeoLite2-Country.mmdb"
ServerMaxIdleTimeoutSec = 60
DefaultClientIdleTimeoutSec = 20
DefaultClientHopIntervalSec = 10
)
func SpeedTrans(upM, downM int) (uint64, uint64) {
up := uint64(upM) * mbpsToBps
down := uint64(downM) * mbpsToBps
return up, down
}