소스 검색

actually follow redirect of UDP

v2ray 9 년 전
부모
커밋
125ef8372c
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      proxy/dokodemo/dokodemo.go

+ 5 - 1
proxy/dokodemo/dokodemo.go

@@ -90,7 +90,11 @@ func (this *DokodemoDoor) Start() error {
 
 func (this *DokodemoDoor) ListenUDP() error {
 	this.udpServer = udp.NewUDPServer(this.meta, this.packetDispatcher)
-	udpHub, err := udp.ListenUDP(this.meta.Address, this.meta.Port, udp.ListenOption{Callback: this.handleUDPPackets})
+	udpHub, err := udp.ListenUDP(
+		this.meta.Address, this.meta.Port, udp.ListenOption{
+			Callback:            this.handleUDPPackets,
+			ReceiveOriginalDest: this.config.FollowRedirect,
+		})
 	if err != nil {
 		log.Error("Dokodemo failed to listen on ", this.meta.Address, ":", this.meta.Port, ": ", err)
 		return err