Browse Source

Fix: Support both dokodemo inbound config types

Shelikhoo 3 years ago
parent
commit
3673ed2be8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      infra/conf/v5cfg/inbound.go

+ 3 - 0
infra/conf/v5cfg/inbound.go

@@ -72,6 +72,9 @@ func (c InboundConfig) BuildV5(ctx context.Context) (proto.Message, error) {
 	if content, ok := inboundConfigPack.(*dokodemo.SimplifiedConfig); ok {
 	if content, ok := inboundConfigPack.(*dokodemo.SimplifiedConfig); ok {
 		receiverSettings.ReceiveOriginalDestination = content.FollowRedirect
 		receiverSettings.ReceiveOriginalDestination = content.FollowRedirect
 	}
 	}
+	if content, ok := inboundConfigPack.(*dokodemo.Config); ok {
+		receiverSettings.ReceiveOriginalDestination = content.FollowRedirect
+	}
 
 
 	return &core.InboundHandlerConfig{
 	return &core.InboundHandlerConfig{
 		Tag:              c.Tag,
 		Tag:              c.Tag,