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-22 08:37:32 +02:00
|
|
|
var (
|
|
|
|
DEFAULT_RELAY = "croc.schollz.com"
|
|
|
|
DEFAULT_RELAY6 = "croc6.schollz.com"
|
|
|
|
DEFAULT_PORT = "9009"
|
|
|
|
DEFAULT_PASSPHRASE = "pass123"
|
|
|
|
)
|
2020-10-13 21:26:11 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|