diff --git a/po/ja/fleth.po b/po/ja/fleth.po index e56afad..8143d63 100644 --- a/po/ja/fleth.po +++ b/po/ja/fleth.po @@ -80,7 +80,7 @@ msgid "We recommend setting MTU to 1460 in MAP-E and DS-Lite." msgstr "※MAP-EおよびDS-Liteユーザー:MTUを1460に設定することをお勧めします。" msgid "Auto Renew DHCPv6" -msgstr "DHCPv6自動更新" +msgstr "DHCPv6リースの自動更新" msgid "We recommend enabling it when using CROSS(10Gbps) plan." msgstr "※クロス(10ギガ)プランを使用する場合は、有効にすることをお勧めします。" diff --git a/root/usr/sbin/fleth b/root/usr/sbin/fleth index 3acd30b..eb221fb 100755 --- a/root/usr/sbin/fleth +++ b/root/usr/sbin/fleth @@ -35,22 +35,30 @@ r_OFFSET="" e_AREA="UNKNOWN" -# have other way to detect area(and fle〇's default DNS): -# dhcpv6 request in wan6 -# domain iptvf.jp xxxx-east.jp <- point get_area(){ # east or west - wget --timeout=1 -s "http://[2404:1a8:f401:100::1]/l/__healthcheck" -O /tmp/null > /dev/null 2>&1 - if [ $? -eq 0 ]; then - e_AREA="EAST" - DNS=$DNS_E - else - wget --timeout=1 -s "http://[2001:a7ff:ff0e:1::2]/l/__healthcheck" -O /tmp/null > /dev/null 2>&1 - if [ $? -eq 0 ]; then + if [ -f /tmp/resolv.conf.d/resolv.conf.auto ]; then + if grep -q "flets-east.jp" /tmp/resolv.conf.d/resolv.conf.auto; then + e_AREA="EAST" + DNS=$DNS_E + elif grep -q "flets-west.jp" /tmp/resolv.conf.d/resolv.conf.auto; then e_AREA="WEST" DNS=$DNS_W fi fi + if [ "$e_AREA" = "UNKNOWN" ]; then + wget --timeout=1 -s "http://[2404:1a8:f401:100::1]/l/__healthcheck" -O /tmp/null > /dev/null 2>&1 + if [ $? -eq 0 ]; then + e_AREA="EAST" + DNS=$DNS_E + else + wget --timeout=1 -s "http://[2001:a7ff:ff0e:1::2]/l/__healthcheck" -O /tmp/null > /dev/null 2>&1 + if [ $? -eq 0 ]; then + e_AREA="WEST" + DNS=$DNS_W + fi + fi + fi echo $e_AREA }