2019-08-25 19:21:11 -04:00
|
|
|
package i2ptunconf
|
|
|
|
|
2019-08-31 02:50:11 -04:00
|
|
|
//Option is a Conf Option
|
|
|
|
type Option func(*Conf) error
|
2019-08-25 19:21:11 -04:00
|
|
|
|
|
|
|
//SetTargetForPort sets the port of the Conf's SAM bridge using a string
|
2019-08-31 00:13:10 -04:00
|
|
|
/*func SetTargetForPort443(s string) func(samtunnel.SAMTunnel) error {
|
|
|
|
return func(c samtunnel.SAMTunnel) error {
|
2019-08-25 19:21:11 -04:00
|
|
|
port, err := strconv.Atoi(s)
|
|
|
|
if err != nil {
|
|
|
|
return fmt.Errorf("Invalid Target Port %s; non-number ", s)
|
|
|
|
}
|
|
|
|
if port < 65536 && port > -1 {
|
|
|
|
c.TargetForPort443 = s
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return fmt.Errorf("Invalid port")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|