diff --git a/lib/i2pconv.go b/lib/i2pconv.go index 5da3bf2..46f18e9 100644 --- a/lib/i2pconv.go +++ b/lib/i2pconv.go @@ -12,6 +12,7 @@ import ( // - Type: The type of the tunnel (string). // - Interface: The network interface to bind to (string, optional). // - Port: The port number to bind to (int, optional). +// - Target: The target of the tunnel (string, optional). // - PersistentKey: Indicates if the key should be persistent (bool, optional). // - Description: A description of the tunnel (string, optional). // - I2CP: A map of I2CP (I2P Control Protocol) options (map[string]interface{}, optional). @@ -23,6 +24,7 @@ type TunnelConfig struct { Type string `yaml:"type"` Interface string `yaml:"interface,omitempty"` Port int `yaml:"port,omitempty"` + Target string `yaml:"target,omitempty"` PersistentKey bool `yaml:"persistentKey,omitempty"` Description string `yaml:"description,omitempty"` I2CP map[string]interface{} `yaml:"i2cp,omitempty"` diff --git a/lib/ini.go b/lib/ini.go index d42f5d8..4d94097 100644 --- a/lib/ini.go +++ b/lib/ini.go @@ -45,6 +45,8 @@ func (c *Converter) parseINI(input []byte) (*TunnelConfig, error) { if err == nil { config.Port = port } + case "destination": + config.Target = value default: if strings.HasPrefix(key, "i2cp.") { config.I2CP[strings.TrimPrefix(key, "i2cp.")] = value diff --git a/lib/properties.go b/lib/properties.go index 151ca8b..55d49ae 100644 --- a/lib/properties.go +++ b/lib/properties.go @@ -52,6 +52,8 @@ func (c *Converter) parsePropertyKey(k, s string, config *TunnelConfig) { config.PersistentKey = true case "description": config.Description = s + case "targetDestination": + config.Target = s default: if strings.HasPrefix(parts[1], "option.i2cp") { config.I2CP[parts[2]] = s