mirror of
https://github.com/go-i2p/go-i2ptunnel.git
synced 2025-07-13 16:53:24 -04:00
Fix instantiators for TCP, UDP, stub instantiators for IRC
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"strings"
|
||||
|
||||
i2pconv "github.com/go-i2p/go-i2ptunnel-config/lib"
|
||||
i2ptunnel "github.com/go-i2p/go-i2ptunnel/lib/core"
|
||||
"github.com/go-i2p/i2pkeys"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
@ -25,8 +26,10 @@ func NewTCPClient(config i2pconv.TunnelConfig, samAddr string) (*TCPClient, erro
|
||||
return nil, err
|
||||
}
|
||||
return &TCPClient{
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
I2PAddr: addr,
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
I2PAddr: addr,
|
||||
I2PTunnelStatus: i2ptunnel.I2PTunnelStatusStopped,
|
||||
done: make(chan struct{}),
|
||||
}, nil
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
i2pconv "github.com/go-i2p/go-i2ptunnel-config/lib"
|
||||
i2ptunnel "github.com/go-i2p/go-i2ptunnel/lib/core"
|
||||
limitedlistener "github.com/go-i2p/go-limit"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
@ -29,9 +30,10 @@ func NewTCPServer(config i2pconv.TunnelConfig, samAddr string) (*TCPServer, erro
|
||||
return nil, err
|
||||
}
|
||||
return &TCPServer{
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
Addr: addr,
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
Addr: addr,
|
||||
I2PTunnelStatus: i2ptunnel.I2PTunnelStatusStopped,
|
||||
LimitedConfig: limitedlistener.LimitedConfig{
|
||||
MaxConns: 1000,
|
||||
RateLimit: 100,
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"strings"
|
||||
|
||||
i2pconv "github.com/go-i2p/go-i2ptunnel-config/lib"
|
||||
i2ptunnel "github.com/go-i2p/go-i2ptunnel/lib/core"
|
||||
"github.com/go-i2p/i2pkeys"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
@ -25,8 +26,10 @@ func NewUDPClient(config i2pconv.TunnelConfig, samAddr string) (*UDPClient, erro
|
||||
return nil, err
|
||||
}
|
||||
return &UDPClient{
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
I2PAddr: addr,
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
I2PAddr: addr,
|
||||
I2PTunnelStatus: i2ptunnel.I2PTunnelStatusStopped,
|
||||
done: make(chan struct{}),
|
||||
}, nil
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
i2pconv "github.com/go-i2p/go-i2ptunnel-config/lib"
|
||||
i2ptunnel "github.com/go-i2p/go-i2ptunnel/lib/core"
|
||||
"github.com/go-i2p/onramp"
|
||||
)
|
||||
|
||||
@ -28,9 +29,10 @@ func NewUDPServer(config i2pconv.TunnelConfig, samAddr string) (*UDPServer, erro
|
||||
return nil, err
|
||||
}
|
||||
return &UDPServer{
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
Addr: addr,
|
||||
done: make(chan struct{}),
|
||||
TunnelConfig: config,
|
||||
Garlic: garlic,
|
||||
Addr: addr,
|
||||
I2PTunnelStatus: i2ptunnel.I2PTunnelStatusStopped,
|
||||
done: make(chan struct{}),
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user