AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
24.84k stars 1.79k forks source link

我希望通过代理访问互联网,但是http_proxy容器变量好像不起作用 translation:I want to access the internet through a proxy, but it seems like the http_proxy container variable is not working. #6880

Open djdjfjfkeocj opened 6 months ago

djdjfjfkeocj commented 6 months ago

Prerequisites

Platform (OS and CPU architecture)

Custom (please mention in the description)

Installation

Docker

Setup

On one machine

AdGuard Home version

latest

Action

我配置dns黑名单的时候,添加上面自带的列表时提示无法连接,于是我通过其他的话题发现要添加http_proxy容器变量,我设置了它为http://192.168.1.5:20172,但是依旧不行,它不起作用。随后我又尝试在此基础上更改了.yaml的配置文件里的http_proxy为http://192.168.1.5:20172,但是依旧不行。我还尝试了同时设置了http_proxy和https_proxy变量,就像jellyfin容器设置的那样。依旧不行,最后同上面一样在此基础上更改了.yaml的配置文件,添加了https_proxy并同上设置。但还是不行

translation by chatgpt: When I was configuring the DNS blacklist, I encountered a problem where I couldn't connect when trying to add the default list provided. Then, through other discussions, I found out that I needed to add the http_proxy container variable. I set it to http://192.168.1.5:20172/, but it still didn't work; it had no effect. Later, I attempted to change the http_proxy variable in the .yaml configuration file based on this, but it still didn't work. I also tried setting both the http_proxy and https_proxy variables simultaneously, as done in the Jellyfin container settings. Still, it didn't work. Finally, following the same approach as before, I added the https_proxy to the .yaml configuration file, but it still didn't work.

Expected result

添加dns黑名单成功

translation by chatgpt:

Successfully added DNS blacklist.

Actual result

添加失败

translation by chatgpt: Addition failed.

Additional information and/or screenshots

No response

ghost commented 6 months ago

To determine where the issue is, does this occur for you outside of a containerised environment?

Also is your value for http_proxy in the yaml the correct format?

http_proxy: Proxy URL for HTTP client, e.g. http://user:password@server:port/. Supports http, https and socks5 schemes.

djdjfjfkeocj commented 5 months ago

To determine where the issue is, does this occur for you outside of a containerised environment?

Also is your value for http_proxy in the yaml the correct format?

http_proxy: Proxy URL for HTTP client, e.g. http://user:password@server:port/. Supports http, https and socks5 schemes.

我填写的是url是正确的,因为和我在jellfin容器的http_proxy和https_proxy填写的一样。

I filled in the URL correctly because it was the same as the http_proxy and https_proxy I filled in in the jellfin container.

someonewating commented 1 week ago

I have the same issue here.

The issue is not happening in my host level, I am using two kinds of variables: all_proxy=socks5://127.0.0.1:10808 and https_proxy=http://127.0.0.1:10809, both verified by curl.

This only happened in the AdguardHome container environment.

Like the author, I set https_proxy, http_proxy, as well as all_proxy in the container, but looks like AdGuard Home will not read and use environment variables.

So in the AdGuardHome.yml, I set:

http_proxy: http://[my_host_machine_IP]:10809/ #not using 127.0.0.1
trusted_proxies:
    - [my_host_machine_IP]/24

But the issue persists. Any thoughts?