Freedom UDP: Fix some cone uses like STUN,... when address is domain#4942
Freedom UDP: Fix some cone uses like STUN,... when address is domain#4942
Conversation
|
Reviewing... 我想了下如果配置中有覆写地址/端口,似乎返回包的来源也没那么重要,可以这么改 |
|
yes, if address is override in config, b.UDP remain anyway, response-address should be matched with one of request-addresses. |
|
然后这个 PR 的逻辑是如果返回包的来源和发送包时的去向相同,则修改返回包的来源(可能一样,或改成 domain),LGTM |
|
if the address before resolving is IP, changedAddr=unchangedAddr also, for fakedns we have another change(domain <-> fakeIP) and "override.go" handle that, so we should not worry about that. |
|
@patterniha You've been invited to join Project X organization |
|
虽然暂时没有仓库的维护权限,但是 @patterniha 展现出来的代码能力是值得认可的,感谢你的每一次贡献 |
|
Thank you very much, it's an honor. Actually, I saw Xray-core on my people's phones and wanted to help develop it so that I could help my people. |
|
Thank you, the thing works like I've expected before! |
although #4816 has no problem and cover most uses,
but it doesn't help for some special cone uses like STUN, when only initial-request-address can be a domain(and using fakedns)
(#4816 didn't break anything, just didn't fix this situation)
///
this PR also fix situations like STUN when only initial-request-address can be a domain.
///
solving other situations when other requests can also be domain requires more effort, needs the implementation of reverse-IP-lookup-map and some changes to "override.go", but it may be useless, because different domains may have the same-IP, so it is impossible to map IP to domain: #2962 (comment)