Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions slim/ASUSddns_slim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ asus_request(){
local path="ddns/update.jsp"
;;
esac

echo $(echo -e -n "GET /$path?hostname=$host&myip=$wanIP HTTP/1.1\r\nHost: ns1.asuscomm.com\r\nAuthorization: Basic $user_base64\r\n\r\n" | nc -w 5 ns1.asuscomm.com 80 | head -1 | cut -d ' ' -f 2)
if [ "$(nvram get ipv6_service)" != "disabled" ]; then
wanIPv6=$(nvram get ipv6_rtr_addr)
if [ "$wanIPv6" != "" ];then
wanIPv6="&myipv6=$wanIPv6"
fi
fi
echo $(echo -e -n "GET /$path?hostname=$host&myip=$wanIP$wanIPv6 HTTP/1.1\r\nHost: ns1.asuscomm.com\r\nAuthorization: Basic $user_base64\r\n\r\n" | nc -w 5 ns1.asuscomm.com 80 | head -1 | cut -d ' ' -f 2)
}

get_wan_ip(){
Expand Down