just some tweaks

This commit is contained in:
idk
2020-09-14 20:54:14 -04:00
parent cfff13a45f
commit 30cfcf48dd

View File

@ -22,17 +22,17 @@ func Sammy(opts map[string]string) (*sam3.StreamListener, error) {
if _, ok := opts[`sam`]; !ok {
opts[`sam`] = "127.0.0.1:7656"
}
if _, ok := opts[`keypath`]; !ok {
opts[`keypath`] = "keys.i2pkeys"
}
if _, ok := opts[`servertun`]; !ok {
opts[`servertun`] = "serv" + RandStringBytes()
}
if _, ok := opts[`keypath`]; !ok {
opts[`keypath`] = opts[`servertun`] + ".i2pkeys"
}
} else {
opts := make(map[string]string)
opts[`sam`] = "127.0.0.1:7656"
opts[`keypath`] = "keys.i2pkeys"
opts[`servertun`] = "serv" + RandStringBytes()
opts[`keypath`] = opts[`servertun`] + ".i2pkeys"
}
if sam, err := sam3.NewSAM(opts[`sam`]); err != nil {
return nil, err