yichya / luci-app-xray

(Almost) full feature Xray client for OpenWrt
Mozilla Public License 2.0
580 stars 433 forks source link

when I put the domain address connection is not established!!! #295

Closed rezconf closed 6 months ago

rezconf commented 1 year ago

When I want to add a server in openwrt in the Server Hostname section, when I put the domain address, the connection is not established? But when I put the IP address of the server, the connection is established. what is the problem ? Thanks alot

malikshi commented 1 year ago

Try with domain but set allowInsecure true. Did you have normal connection? Try remote the dns? I don't know if it possible in xray. Worth to try.

yukeiyang commented 1 year ago

Seems inputting ip in address box is the standard usage if you are using reality version.

image

rezconf commented 1 year ago

Try with domain but set allowInsecure true. Did you have normal connection? Try remote the dns? I don't know if it possible in xray. Worth to try.

Well, the allowinsecure option is not available in the reality configuration.

Soberia commented 1 year ago

I have this error on my logs when trying to connect with a domain name instead of an IP address:

Mon May  8 21:02:45 2023 daemon.info xray[9144]: 2023/05/08 16:32:45 [Warning] transport/internet: failed to resolve ip > app/dns: returning nil for domain my.***.io > multierr: context deadline exceeded | context deadline exceeded |
Mon May  8 21:02:45 2023 daemon.info xray[9144]: 2023/05/08 16:32:45 [Warning] transport/internet: failed to resolve ip > app/dns: returning nil for domain my.***.io > multierr: context deadline exceeded | context deadline exceeded |

This seems to be a DNS resolution problem. Setting the domain name in "DNS Settings -> Bypassed domain rules" are also not gonna help either. I also have another problem with DNS. If xray-core couldn't establish a successful connection to the proxy server for whatever reason, DNS resolution also breaks on my other network interfaces so I have to manually stop the xray service.

tarabrind commented 10 months ago

I have this error on my logs when trying to connect with a domain name instead of an IP address:

Mon May  8 21:02:45 2023 daemon.info xray[9144]: 2023/05/08 16:32:45 [Warning] transport/internet: failed to resolve ip > app/dns: returning nil for domain my.***.io > multierr: context deadline exceeded | context deadline exceeded |
Mon May  8 21:02:45 2023 daemon.info xray[9144]: 2023/05/08 16:32:45 [Warning] transport/internet: failed to resolve ip > app/dns: returning nil for domain my.***.io > multierr: context deadline exceeded | context deadline exceeded |

This seems to be a DNS resolution problem. Setting the domain name in "DNS Settings -> Bypassed domain rules" are also not gonna help either. I also have another problem with DNS. If xray-core couldn't establish a successful connection to the proxy server for whatever reason, DNS resolution also breaks on my other network interfaces so I have to manually stop the xray service.

I have the same problem and the suggested PR helps solve it!

UPD: There is no such problem in version 3.1.0

yichya commented 6 months ago

For anyone still encountering this issue, try following https://github.com/yichya/luci-app-xray/issues/389#issuecomment-1952849508