actually follow redirect of UDP

pull/2034/head
v2ray 2016-08-16 13:04:07 +02:00
parent 41d89e6d1e
commit 125ef8372c
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 5 additions and 1 deletions

View File

@ -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