Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy host can be use domain #1052

Closed
wants to merge 1 commit into from
Closed

Conversation

EngsShi
Copy link

@EngsShi EngsShi commented Apr 24, 2023

like this : PROXY_URL="socks5://host.docker.internal:7890"

fix "proxy host.docker.internal has invalid value or is not numeric"

like this : PROXY_URL="socks5://host.docker.internal:7890" 

 fix "proxy host.docker.internal has invalid value or is not numeric"
@cddc
Copy link

cddc commented Apr 25, 2023

I don't think it's a good idea to convert the domain into IP in the Dockerfile.
host=$(nslookup $host | grep -A1 'Name:' | tail -1 | awk '{print $2}')

It means the IP address will be fixed, once the container is started. However, in some cases, the results of DNS will be change.

So, is there a better way to solve this problem? Mayby, the nslookup should be used for each of the proxy connection?

@EngsShi
Copy link
Author

EngsShi commented Apr 25, 2023

I don't think it's a good idea to convert the domain into IP in the Dockerfile. host=$(nslookup $host | grep -A1 'Name:' | tail -1 | awk '{print $2}')

It means the IP address will be fixed, once the container is started. However, in some cases, the results of DNS will be change.

So, is there a better way to solve this problem? Mayby, the nslookup should be used for each of the proxy connection?

原计划解决魔法上网工具安装在宿主机的问题。并且编写在CMD中就是每次启动拉取最新ip地址,并非一次性固化。若要解决启动期间的DNS动态变化问题,需要proxychains支持,该工具我并不熟悉是否有更优解决方案。

@cddc
Copy link

cddc commented Apr 26, 2023

I found that proxychains can only support configuration in IP format. Therefore, it is suitable to use proxychains to proxy some programs that run for a short time, but it may not be suitable for proxying web services such as ChatGPT Next.

In fact, according to the configuration requirements of proxychains, the first proxy in the ProxyList must be in IP format, while the subsequent proxies (second and third) can be in domain name format (which means that it will use the first proxy to perform DNS resolution for all subsequent domain name proxies). However, this clue is not helpful for our current problem.

@Yidadaa Yidadaa closed this Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants