私の地元のモバイルISPからの検閲を避けたい(たとえば、何らかの不明な理由でimgurをブロックします。
スクリーンショット(より大きいバリアントの画像をクリック)
私は私のDNSをGoogle DNSまたはOpenDnsに変更することによってこれを回避できることはほとんど確実ですが、Kitkatについてこれを達成する方法はわかりません。
<事前> <コード> ./unyaffs20私の地元のモバイルISPからの検閲を避けたい(たとえば、何らかの不明な理由でimgurをブロックします。
スクリーンショット(より大きいバリアントの画像をクリック)
私は私のDNSをGoogle DNSまたはOpenDnsに変更することによってこれを回避できることはほとんど確実ですが、Kitkatについてこれを達成する方法はわかりません。
<事前> <コード> ./unyaffs20I want to avoid censorship from my local mobile ISP (it blocks imgur, for example, for some unknown reason.
Screenshot (click image for larger variant)
I'm pretty certain that I can circumvent this by changing my DNS to Google DNS or OpenDNS, but I'm not really sure how to accomplish this on KitKat.
Info: Device: Nexus 5 Android version: 4.4.2 Device status: rooted
OK、まず完全開示:私は現在Google Playストア上にあるアプリの作者であり、Android 4.4での携帯電話のDNSを変更することができます。 App はroot を必要としています。 = "nofollow"> DNS をオーバーライドします。 私は今削除された答えについて、それを明確に公開する限り、私のアプリにリンクするのは公平です。
このリリースのAndroid(4.4)で見つけた問題は、明らかにキャッシングの理由から、システムの動作が変更され、すべてのDNSクエリを 99887766666666644330
と呼ばれるシステムデーモンにリダイレクトすることです。 リンクプレゼンテーションに関連してただし、4.4前のAndroidネットワーキングには、これらのトピックの一部をカバーします)。
<コード> netd1 / <コード> 99887766544332 メソッドはもう機能しません。これらの値は、変更時に、 99887766544333
デーモンによって単純に無視されます。
<コード> 998877666544334 Socketを介してデーモンに直接通信する必要があります。 Androidでは、このジョブを正確にしている 9988776654435
というツールが現在表示されています。
DNS関連のものの構文はこれです:
<コード> netd6
app ネットワークデバイス名を自動推測するモバイルネットワークがアクティブになるたびにこれらのコマンドを適用します。
Ok, first of all full disclosure: I'm the author of an app which is now on the Google Play Store and which makes you able to change DNS for any mobile connection on Android 4.4. The app requires root, costs a couple of bucks and is called Override DNS. I was told, on a now deleted answer, that is fair to link to my app as long as I expose it clearly.
The problem I found with this release of Android (4.4) is that, apparently for caching reasons, the system behaviour has been changed to redirect all DNS queries to a system daemon called netd
(here's a link to a presentation related to Android networking before 4.4 which, however, covers part of these topics).
The getprop
/setprop
method does not work anymore. Those values, when changed, get simply ignored by the netd
daemon.
It's necessary to communicate directly to the daemon via the /dev/socket/netd
socket. In Android it's now present a tool called ndc
which does exactly this job.
The syntax for the DNS related stuff is this:
# ndc resolver flushif <iface> # ndc resolver flushdefaultif # ndc resolver setifdns <iface> <domains> <dns1> <dns2> # ndc resolver setdefaultif <iface>
The app automatically guesses the network device name and applies these commands each time a mobile network gets activated.
その理由はここで説明されています。 com / showpost.php?p = 44722857&AMP; PostCount = 6 すべてのアプリは、/ dev / socket / dnsproxy unixソケットを介してNetDを介してDNSルックアップを行います。このスレッドはなぜシステムプロパティが無視されているのかを説明します。
これを元に戻すには、
<事前> <コード> adb shell1、UDP DPTに対応する行番号を見つけます.53~:xxx.xxx.xxx.xxx:53 そして
をやる <事前> <コード> adb shell2I "solved" this problem by using an iptables rule to forward all port 53 connections to an intended DNS server; my experience on Android 4.4.2 with attempting to modify DNS settings while connected to 3G has been exactly as Leo described; ignorance of values in getprop |grep dns[0-9]\]: and dhcpd.conf.
iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 8.8.8.8:53
The reason is as described here: http://forum.xda-developers.com/showpost.php?p=44722857&postcount=6 All apps do DNS lookups through netd via a /dev/socket/dnsproxyd unix socket. This thread also describes why system properties are being ignored.
To undo this, do
iptables -t nat -L OUTPUT -n -v --line-numbers
, find the line number that corresponds to udp dpt:53 to:xxx.xxx.xxx.xxx:53 and do
iptables -t nat -D OUTPUT *linenumber*
悲しいことに、今のところには不可能であるかもしれませんが、 DNSチェンジャー。あなたが根ざしているならばこれは機能するかもしれませんが、保証はありません。
使用する良いDNSサービスは、GoogleのPublic DNSサービスです。それはここでこれらの種類の問題のために非常にうまくいく傾向があります。
これのどれも機能しない場合は、答えを探し続けます。このようなもののための良いサイトは、 XDA開発者。彼らはAndroidのためのものに多くの答えを持つ傾向があります。
Sadly, it may be impossible to do as of right now, however, it is possible to try DNS Changer. This may work if you are rooted, but there are no guarantees.
A good DNS service to use would be Google's public DNS service. It tends to work out very well for these type of issues right here.
If none of this works, keep looking for answers. A good site for things like this is XDA Developers. They tend to have many answers on things for Android.
私はKitkat CyanogenMod 11、つまり既定に根ざしています。私は失敗しか報告できないと:
1st法:
<コード> 998876665544333 を
で試してみると<コード> setprop net.rmnet0.dns1 208.67.222.222 setprop net.rmnet0.dns2 208.67.222.222 setprop net.rmnet1.dns1 208.67.222.222 setprop net.rmnet1.dns2 208.67.222.222 setprop net.rmnet2.dns1 208.67.222.222 setprop net.rmnet2.dns2 208.67.222.222 setprop net.dns1 208.67.222.222 setprop net.dns1 208.67.222.222
そしてどのIP hjfdkhfjkyuiwnwnwetbyebvtwgqwdi.tkが解決するかをテストします... 私はNXDOMAINの対応を得ます。つまり、私が設定したOpenDns NameServerから来なかったことはありませんでした。
を稼ぐとき
<コード> getprop | grep dns
私が何を設定したのはわかります。ただし、WiFiからMobileに切り替えるとき(3Gまたは4G / LTE)私は私が私のモバイルキャリアに割り当てられていると認識しているIPを見ます。 "DNSwitch"や "DNS Changer"のようなアプリは、ネットワーク変更時にそれらのリゾルバを自動的に再設定できます。しかし、<コード> getprop は私を報告しているものはまだ解決しているものではありません。
2nd法[A]:
もう一つの方法は、Modifieng <コード> /system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf はそこに固定されたものを設定します(つまり、ネットワーク名とリゾルバの数は異なる場合があります)。成功せずに。
第2法[B]:
および 998876655443338
iは、DHCPのネゴシエーション時のリゾルバを受け入れます。成功しない。
第3法:
これまでのところ、SOCKS4を使用して、「SSHトンネル」を使用して、「貧弱なMan VPN」を使用しているだけですが、私が正確に良い結果が得られなかったことを使用してください。
履歴書:
他の場所に設定されたDNSのどちらか、またはすべてがすぐに転送されている(ハイジャックされている)のどちらかのようです。
だから、どうやって来る?ネットワークの中立性を破壊するためのツールを持つキャリアを提供するもう1つの汚れた方法は?
あなたの問題にあなたの質問はそのためでした。 SSHTUNNLELがあなたのキャリアの検閲を回避するための代替的な解決策であるならば、あなたは試してみましたか?
I'm on KitKat Cyanogenmod 11, meaning I'm rooted by default. Despite that I can only report failure:
1st method:
When I try the adb shell
with
setprop net.rmnet0.dns1 208.67.222.222 setprop net.rmnet0.dns2 208.67.222.222 setprop net.rmnet1.dns1 208.67.222.222 setprop net.rmnet1.dns2 208.67.222.222 setprop net.rmnet2.dns1 208.67.222.222 setprop net.rmnet2.dns2 208.67.222.222 setprop net.dns1 208.67.222.222 setprop net.dns1 208.67.222.222
and then test to which IP hjfdkhfjkyuiwnwetbyebvtwgqwdi.tk resolve's... I get an NXDOMAIN response, meaning it didn't came from the OpenDNS nameserver I've set (which would return an answer with an alternative IP, to serve you adds).
When doing
getprop | grep dns
I would only see what I've configured. However when switching from WiFi to mobile (3G or 4G/LTE) I see IP's that I recognize as being assigned to my mobile carrier. Apps like "DNSwitch" or "DNS Changer" can re-set those resolvers automaticly at network change. However what getprop
reports me, is still not what's truly doing the resolving.
2nd method [a]:
Another way I tried, is modifieng /system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf
an set things fixed in there (but be aware network names and number of resolvers can differ). Without success.
2nd method [b]:
And in /system/etc/dhcpcd/dhcpcd.conf
I removed the parameter to accept resolvers at DHCP negociation. No success either.
3th method:
So far the only thing that would work a little is using a "poor man VPN", using the app "SSH Tunnel", using SOCKS4, but using that I did not exactly got a good result.
Resume:
It seems like either DNS set elsewhere, or all are forwarded (hijacked) as soon the network is mobile.
So, how come? Is it another dirty way to provide carriers with a tool to demolish network neutrality?
In your case your question was because of that. Do you have SSH to try if SSHTunnel is a alternative solution to get around your carriers censoring?
今日も同じ問題を遭遇し、輸血のおかげで。私はアプリ " dns forwarde R "を開発しようとしましたそれを取り出すために。システム上のDNSサーバーは変更されませんが、DNSクエリを別のサーバーに転送します。この回避策はKitkat(Nexus 5 / 4.4.3とMoto Razr / CM11)で私にとってうまく機能します。それが他のものにも役立つことを願っています。
I encountered the same problem today, and thanks to Transfusion. I tried to develop an app "DNS forwarder" to work it out. It does not change dns server on system, but forward dns queries to another server. This workaround works fine for me on Kitkat (Nexus 5/4.4.3 and Moto Razr/CM11). Hope it can help other as well.
現在、あなたのモバイルデータにDNSを変更する方法があるとは思わない。しかし、あなたの電話が根ざしている場合は、 dnsを設定する
Currently I don't think there's any way to change your DNS on your mobile data. But if your phone is rooted you can use apps like Set DNS.
© 2022 cndgn.com All Rights Reserved. Q&Aハウス 全著作権所有