croc/src/models/constants.go

23 lines
574 B
Go
Raw Normal View History

2018-09-23 15:28:34 +02:00
package models
2020-10-13 21:26:11 +02:00
import "net"
2019-09-07 18:46:04 +02:00
// TCP_BUFFER_SIZE is the maximum packet size
2019-04-30 15:58:57 +02:00
const TCP_BUFFER_SIZE = 1024 * 64
2019-09-07 18:46:04 +02:00
// DEFAULT_RELAY is the default relay used (can be set using --relay)
2020-10-13 21:26:11 +02:00
var DEFAULT_RELAY = "croc.schollz.com"
var DEFAULT_RELAY6 = "croc6.schollz.com"
var DEFAULT_PORT = "9009"
func init() {
iprecords, _ := net.LookupIP(DEFAULT_RELAY)
for _, ip := range iprecords {
DEFAULT_RELAY = ip.String() + ":" + DEFAULT_PORT
}
iprecords, _ = net.LookupIP(DEFAULT_RELAY6)
for _, ip := range iprecords {
DEFAULT_RELAY6 = "[" + ip.String() + "]:" + DEFAULT_PORT
}
}