msasanmh / SecureDNSClient

A DNS Client Supporting DNSCrypt, Anonymized DNSCrypt, DoH, DoT, UDP And TCP.
https://msasanmh.github.io/SecureDNSClient/
GNU General Public License v3.0
815 stars 80 forks source link

How proxy function work #75

Closed godshades closed 11 months ago

godshades commented 11 months ago

Hi, thanks for nice project I have enable function in tab 4.Share + Bapass How can i set this dns proxy to router running openwrt

msasanmh commented 11 months ago

Hi, thanks for nice project I have enable function in tab 4.Share + Bapass How can i set this dns proxy to router running openwrt

Hi, I'm not familiar with openwrt, but if your router is on the same network and has the ability to set http proxy, then just set the proxy address and port that application gives you in the log window. I'm not quite sure if I understood your question though.

nonbarbari commented 11 months ago

Hi, thanks for nice project I have enable function in tab 4.Share + Bapass How can i set this dns proxy to router running openwrt

This is not a DNS proxy or smart DNS or proxy over DNS. This is an HTTP server that allows any client in the network to use SDC facilities by setting HTTP proxy.

If you meant: directing all network traffic to an internal proxy server in opnewrt, this was the answer given by bing.com

To redirect all network traffic to an internal proxy server in OpenWrt, you can use the iptables command. Here is an example command that redirects all traffic to a proxy server running on IP address 192.168.1.100 and port 8080:

iptables -t nat -A PREROUTING -i br-lan -p tcp --dport 80 -j DNAT --to 192.168.1.100:8080

This command redirects all HTTP traffic to the specified proxy server. You can modify this command to redirect other types of traffic as well.

You can also use Squid as a proxy server on OpenWrt. Here is a guide on how to set it up: https://openwrt.org/docs/guide-user/services/proxy/proxy.squid³.

I hope this helps!

(1) Redirect all traffic to one website - Network and Wireless .... https://forum.openwrt.org/t/redirect-all-traffic-to-one-website/60326. (2) Redirect all web traffic (including https) through proxy server. https://superuser.com/questions/1277914/redirect-all-web-traffic-including-https-through-proxy-server. (3) iptables forward all traffic through proxy - Server Fault. https://serverfault.com/questions/848775/iptables-forward-all-traffic-through-proxy.

But I don't think setting proxy in clients is more difficult than setting proxy in your router

godshades commented 11 months ago

@nonbarbari the reason is SDC is run only in window i want setup for all device in my home: phone, tv, ... @msasanmh do you know any linux script for check dns ping like your SDC or can you tech me what step i need to do i want run this on my adguardhome server to find lowest ping

msasanmh commented 11 months ago

@nonbarbari the reason is SDC is run only in window i want setup for all device in my home: phone, tv, ...

SDC can share Windows local Plain DNS and DoH on same network, for an android device you can use SDC's DoH, but it requires installing the "rootCA" certificate on your android device. From SDC's settings --> Working Mode, select the second option to activate local DoH server. The certificate is located in "certificate" directory. Remember you need to install the rootCA cert in RootCA section of android device not other places. Then you can use an android app called "Intra" to set the DoH on your device.

Honestly I wouldn't go down this road if I were you, I'm out of patience. It's too much manual job for me.

@msasanmh do you know any linux script for check dns ping like your SDC or can you tech me what step i need to do i want run this on my adguardhome server to find lowest ping

Unfortunately there's none, not for Linux nor Windows. This was the first reason I've started writing this app.

nonbarbari commented 11 months ago

@nonbarbari the reason is SDC is run only in window i want setup for all device in my home: phone, tv, ... @msasanmh do you know any linux script for check dns ping like your SDC or can you tech me what step i need to do i want run this on my adguardhome server to find lowest ping

Doesn't the adguard home software itself do this automatically? ! I think the it does this by itself send Issue to adguardhome