|
|
@@ -130,7 +130,10 @@ type InboundDetourConfig struct {
|
|
|
func (c *InboundDetourConfig) Build() (*core.InboundHandlerConfig, error) {
|
|
|
receiverSettings := &proxyman.ReceiverConfig{}
|
|
|
|
|
|
- if c.ListenOn == nil {
|
|
|
+ // TUN inbound doesn't need port configuration as it uses network interface instead
|
|
|
+ if c.Protocol == "tun" {
|
|
|
+ // Skip port validation for TUN
|
|
|
+ } else if c.ListenOn == nil {
|
|
|
// Listen on anyip, must set PortList
|
|
|
if c.PortList == nil {
|
|
|
return nil, errors.New("Listen on AnyIP but no Port(s) set in InboundDetour.")
|