找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 40730|回复: 30

自定义DDNS实现3322.org更新

[复制链接]
发表于 2006-8-9 21:11 | 显示全部楼层 |阅读模式
新版本出来还要测试,有段时间才能用,现在有自定义版本的dd-wrt都可以手工加3322。org的支持。
如下图,各个版本有小差异,我拿到的这个版本(2006-07-13)的设置如下

但是(2006-07-13)这个版本的还有bug,注意前面要加"\\",保存后剩下一个"\",不然是用不了的,因为这个版本的DD-WRT在合并自定义参数的时候没加空格,导致后面的参数和前面的合并了,单独的空格保存不了。
最下方的内容填下面内容:

"\\ --ip_server_name www.bliao.com:2000 /ip.phtml --dyndns_server_name www.3322.org:80 --dyndns_server_url /dyndns/update?hostname="

自定义参数说明:
--dyndns_system     custom@http_svr_basic_auth 自定义链接更新模式
--ip_server_name    www.bliao.com:2000 /ip.phtml 可以获取ip地址的链接,格式:server:port url,port和url之间有个空格
--dyndns_server_name    www.3322.org:80 域名服务器,格式:server:port
--dyndns_server_url   /dyndns/update?hostname=" 域名更新链接:url

参照3322提供的更新链接 http://www.3322.org/dyndns/update?system=dyndns&hostname=hostname,和dd-wrt上面的帖子就是这样了:http://www.dd-wrt.com/phpBB2/viewtopic.php?t=2161

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
 楼主| 发表于 2006-8-9 21:20 | 显示全部楼层
kmip.net和花生壳动态域名还需要进一步测试,他们的客户端都不提供源码,查看发出的包是UDP包,有自己一套更新协议,DD现在内置的Inadyn应该不支持。客户端比较大,要DD集成估计可能不大,除非能知道包的定义。如果愿意可以把客户端拷贝进DD运行,如果可以的话。

点评

www.rrkds.com/meiju/美国电视剧  发表于 2014-9-30 19:50
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2006-8-10 09:14 | 显示全部楼层
技术贴,加精。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2006-8-10 09:34 | 显示全部楼层
dear是好兄弟,请把本文内容加入到中文wiki吧

dd-wrt.2288.org
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2006-8-10 15:43 | 显示全部楼层
最新版已集成3322在里面!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2006-8-10 18:53 | 显示全部楼层
定时任务就可以了,只要定个2分钟用wget下载一次 http://www.3322.org/dyndns/updat ... p;hostname=hostname
写在cron.d里面就搞定了。怎么要这么麻烦。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2006-8-10 22:36 | 显示全部楼层
刘五十三兄弟详细说说呀,怎么做?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2006-8-10 23:54 | 显示全部楼层
原帖由 刘五十三 于 2006-8-10 18:53 发表
定时任务就可以了,只要定个2分钟用wget下载一次 http://www.3322.org/dyndns/updat ... p;hostname=hostname
写在cron.d里面就搞定了。怎么要这么麻烦。


好像cron.d是不能保存的,reboot就要重来,除非修改firmware,或者加脚本到启动里面,有更好的方法请分享一下,定时执行任务还是很有用的

下面是linux环境下修改DD firmware的工具,解包修改后再打包。
http://www.bitsum.com/files/firmware_mod_tools.tar.gz
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2006-8-11 18:21 | 显示全部楼层
在管理-〉诊断里面的窗口输入

  1. echo "*/2 * * * * root /usr/bin/wget -c -O /dev/null  http://username:password@members.3322.org/dyndns/update?system=dyndns\&hostname=liuwushisan.3322.org\&wildcard=OFF\&mx=mail.3322.org\&backmx=NO\&offline=NO" > /tmp/cron.d/3322ddns
复制代码


username:password 是你的用户名和密码liuwushisan.3322.org, mail.3322.org是你的对应的邮件服务器的地址(这个是我瞎填的)
比如mailliuwushisan.3322.org

然后保存启动,每次启动自动生成
/tmp/cron.d/3322ddns
这个文件就用wget2分钟下载一次,ip就更新了。定时关闭wlan,都可以在这里做,比研究dyndns包还改源代码简单多了。

我试了没问题,时间是2分钟,你们ip改了要2分钟对应到域名,考虑到dns的cache,算10分钟吧
你们自己也可以把*/2 改为*/1 就是一分更新一次。不过我觉得1分钟没必要。

这样应该很多旧版本都可以用吧。

我用实际的3322域名试验了,发现wrt里面的wget功能不够,member.3322.org用http连上后有时候要等10秒才有反应,但wrt中的wget没有这个延时选项,
只能看能不能用别的下载软件做到这一点了。或者用perl程序下载的方式来实现。同样的命令在linux下运行的很好。wget会等member.3322.org回应然后发出url过去。

[ 本帖最后由 刘五十三 于 2006-8-11 20:09 编辑 ]
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-1-9 22:57 | 显示全部楼层
根据五十三兄的思路实现了在DD上手动更新3322.org 动态域名解释。

由于DD 自带的wget 命令是轻量级的,只有最基本的功能,不支持需要认证的http服务器(应该不是五十三兄提到的延时问题)。 因此无法实现3322.org的IP更新。 但是从网上下载wget就有了齐全的功能了。自然就可以实现3322.org的更新。



  1. ~ # ipkg install wget
  2. The following package were previously requested but have not been installed:
  3. mysql wget
  4. Install them now [Y/n] ? n

  5. Downloading http://ipkg.nslu2-linux.org/feeds/optware/ddwrt/cross/stable/wget_1.10.2-3_mipsel.ipk ...
  6. Connecting to ipkg.nslu2-linux.org[140.211.166.82]:80
  7. wget_1.10.2-3_mipsel 100% |**************************************************************************|   143 KB 00:00:00 ETA
  8. Done.
  9. Unpacking wget...Done.
  10. Configuring wget...Done.
  11. ~ # cd /opt
  12. /opt # find . |grep wget
  13. ./etc/wgetrc
  14. ./bin/wget
  15. ./man/man1/wget.1
  16. /opt # ./bin/wget -help
  17. GNU Wget 1.10.2, a non-interactive network retriever.
  18. Usage: wget [OPTION]... [URL]...

  19. Mandatory arguments to long options are mandatory for short options too.

  20. Startup:
  21.   -V,  --version           display the version of Wget and exit.
  22.   -h,  --help              print this help.
  23.   -b,  --background        go to background after startup.
  24.   -e,  --execute=COMMAND   execute a `.wgetrc'-style command.

  25. Logging and input file:
  26.   -o,  --output-file=FILE    log messages to FILE.
  27.   -a,  --append-output=FILE  append messages to FILE.
  28.   -d,  --debug               print lots of debugging information.
  29.   -q,  --quiet               quiet (no output).
  30.   -v,  --verbose             be verbose (this is the default).
  31.   -nv, --no-verbose          turn off verboseness, without being quiet.
  32.   -i,  --input-file=FILE     download URLs found in FILE.
  33.   -F,  --force-html          treat input file as HTML.
  34.   -B,  --base=URL            prepends URL to relative links in -F -i file.

  35. Download:
  36.   -t,  --tries=NUMBER            set number of retries to NUMBER (0 unlimits).
  37.        --retry-connrefused       retry even if connection is refused.
  38.   -O,  --output-document=FILE    write documents to FILE.
  39.   -nc, --no-clobber              skip downloads that would download to
  40.                                  existing files.
  41.   -c,  --continue                resume getting a partially-downloaded file.
  42.        --progress=TYPE           select progress gauge type.
  43.   -N,  --timestamping            don't re-retrieve files unless newer than
  44.                                  local.
  45.   -S,  --server-response         print server response.
  46.        --spider                  don't download anything.
  47.   -T,  --timeout=SECONDS         set all timeout values to SECONDS.
  48.        --dns-timeout=SECS        set the DNS lookup timeout to SECS.
  49.        --connect-timeout=SECS    set the connect timeout to SECS.
  50.        --read-timeout=SECS       set the read timeout to SECS.
  51.   -w,  --wait=SECONDS            wait SECONDS between retrievals.
  52.        --waitretry=SECONDS       wait 1..SECONDS between retries of a retrieval.
  53.        --random-wait             wait from 0...2*WAIT secs between retrievals.
  54.   -Y,  --proxy                   explicitly turn on proxy.
  55.        --no-proxy                explicitly turn off proxy.
  56.   -Q,  --quota=NUMBER            set retrieval quota to NUMBER.
  57.        --bind-address=ADDRESS    bind to ADDRESS (hostname or IP) on local host.
  58.        --limit-rate=RATE         limit download rate to RATE.
  59.        --no-dns-cache            disable caching DNS lookups.
  60.        --restrict-file-names=OS  restrict chars in file names to ones OS allows.
  61.   -4,  --inet4-only              connect only to IPv4 addresses.
  62.   -6,  --inet6-only              connect only to IPv6 addresses.
  63.        --prefer-family=FAMILY    connect first to addresses of specified family,
  64.                                  one of IPv6, IPv4, or none.
  65.        --user=USER               set both ftp and http user to USER.
  66.        --password=PASS           set both ftp and http password to PASS.

  67. Directories:
  68.   -nd, --no-directories           don't create directories.
  69.   -x,  --force-directories        force creation of directories.
  70.   -nH, --no-host-directories      don't create host directories.
  71.        --protocol-directories     use protocol name in directories.
  72.   -P,  --directory-prefix=PREFIX  save files to PREFIX/...
  73.        --cut-dirs=NUMBER          ignore NUMBER remote directory components.

  74. HTTP options:
  75.        --http-user=USER        set http user to USER.
  76.        --http-password=PASS    set http password to PASS.
  77.        --no-cache              disallow server-cached data.
  78.   -E,  --html-extension        save HTML documents with `.html' extension.
  79.        --ignore-length         ignore `Content-Length' header field.
  80.        --header=STRING         insert STRING among the headers.
  81.        --proxy-user=USER       set USER as proxy username.
  82.        --proxy-password=PASS   set PASS as proxy password.
  83.        --referer=URL           include `Referer: URL' header in HTTP request.
  84.        --save-headers          save the HTTP headers to file.
  85.   -U,  --user-agent=AGENT      identify as AGENT instead of Wget/VERSION.
  86.        --no-http-keep-alive    disable HTTP keep-alive (persistent connections).
  87.        --no-cookies            don't use cookies.
  88.        --load-cookies=FILE     load cookies from FILE before session.
  89.        --save-cookies=FILE     save cookies to FILE after session.
  90.        --keep-session-cookies  load and save session (non-permanent) cookies.
  91.        --post-data=STRING      use the POST method; send STRING as the data.
  92.        --post-file=FILE        use the POST method; send contents of FILE.

  93. FTP options:
  94.        --ftp-user=USER         set ftp user to USER.
  95.        --ftp-password=PASS     set ftp password to PASS.
  96.        --no-remove-listing     don't remove `.listing' files.
  97.        --no-glob               turn off FTP file name globbing.
  98.        --no-passive-ftp        disable the "passive" transfer mode.
  99.        --retr-symlinks         when recursing, get linked-to files (not dir).
  100.        --preserve-permissions  preserve remote file permissions.

  101. Recursive download:
  102.   -r,  --recursive          specify recursive download.
  103.   -l,  --level=NUMBER       maximum recursion depth (inf or 0 for infinite).
  104.        --delete-after       delete files locally after downloading them.
  105.   -k,  --convert-links      make links in downloaded HTML point to local files.
  106.   -K,  --backup-converted   before converting file X, back up as X.orig.
  107.   -m,  --mirror             shortcut for -N -r -l inf --no-remove-listing.
  108.   -p,  --page-requisites    get all images, etc. needed to display HTML page.
  109.        --strict-comments    turn on strict (SGML) handling of HTML comments.

  110. Recursive accept/reject:
  111.   -A,  --accept=LIST               comma-separated list of accepted extensions.
  112.   -R,  --reject=LIST               comma-separated list of rejected extensions.
  113.   -D,  --domains=LIST              comma-separated list of accepted domains.
  114.        --exclude-domains=LIST      comma-separated list of rejected domains.
  115.        --follow-ftp                follow FTP links from HTML documents.
  116.        --follow-tags=LIST          comma-separated list of followed HTML tags.
  117.        --ignore-tags=LIST          comma-separated list of ignored HTML tags.
  118.   -H,  --span-hosts                go to foreign hosts when recursive.
  119.   -L,  --relative                  follow relative links only.
  120.   -I,  --include-directories=LIST  list of allowed directories.
  121.   -X,  --exclude-directories=LIST  list of excluded directories.
  122.   -np, --no-parent                 don't ascend to the parent directory.

  123. Mail bug reports and suggestions to <bug-wget@gnu.org>.
  124. /opt # ./bin/wget -O /tmp/3322.log http://username:password@members.3322.org/dyndns/update?hostname=hostnamee.3322.org
  125. --00:43:03--  http://*username*:*password*@members.3322.org/dyndns/update?hostname=hostname.3322.org
  126.            => `/tmp/3322.log'
  127. Resolving members.3322.org... 61.177.95.125
  128. Connecting to members.3322.org|61.177.95.125|:80... connected.
  129. HTTP request sent, awaiting response... 200 OK
  130. Length: 18 [text/plain]

  131. 100%[=================================================================================>] 18            --.--K/s            

  132. 00:43:03 (68.40 KB/s) - `/tmp/3322.log' saved [18/18]

  133. /opt # cat /tmp/3322.log
  134. good 58.63.57.202
复制代码

[ 本帖最后由 IT业的民工 于 2007-1-9 22:59 编辑 ]
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-8-5 13:30 | 显示全部楼层
原帖由 IT业的民工 于 2007-1-9 22:57 发表
根据五十三兄的思路实现了在DD上手动更新3322.org 动态域名解释。

由于DD 自带的wget 命令是轻量级的,只有最基本的功能,不支持需要认证的http服务器(应该不是五十三兄提到的延时问题)。 因此无法实现33 ...


我的是 DD-WRT v23 SP2,ipkg update 无法成功获取网页,按你日志中的wget的url手动下载安装后应该是安装过了,文件都在,但是执行起来仍然和以前的一样, -h 参数都不支持,看不到帮助,会显示illegal parameter,http auth 也没有,不知为何?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-11-20 09:01 | 显示全部楼层

我用的版本本身就带3322的DDNS的,为什么要这样设呢?

一年前也刷过几个版本的DDWRT,后来为了要用到DDNS,所以刷了一个直接支持3322的DD-WRT v23 SP2 (08/02/06) std版本的,一直正常使用到现在,使用和前几个版本的比较算是各方面比较稳定好用,所以也就不再折腾我的路由器了,我的路由器是Linksys WRT54G V4的,以前还刷过一个支持花生壳的版本,好像后来好像不支持旧版的更新了,所以也就没刷回去,一直用这个,不知现在最新的版本V24的是不是直接支持3322的DDNS,如果支持的话,想更新一下试试!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-12-18 12:27 | 显示全部楼层
原帖由 funnyPC 于 2007-8-5 13:30 发表


我的是 DD-WRT v23 SP2,ipkg update 无法成功获取网页,按你日志中的wget的url手动下载安装后应该是安装过了,文件都在,但是执行起来仍然和以前的一样, -h 参数都不支持,看不到帮助,会显示illegal par ...


朋友,看来你执行的还是dd的原来自带的轻量级的wget
请加上绝对路径试试,比如你把wget安装在/jffs/opt/bin,那么执行/jffs/opt/bin/wget -h试试,如果你安装成功的话,应该没问题了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-12-18 12:33 | 显示全部楼层
原帖由 刘五十三 于 2006-8-11 18:21 发表
在管理-〉诊断里面的窗口输入

echo "*/2 * * * * root /usr/bin/wget -c -O /dev/null  http://username:password@members ... pdate?system=dyndns\&hostname=liuwushisan.3322.org\&wildcard ...

刘五13兄,现在ddv24自带的wget好像支持wget下这个ddns文件了
但是定时任务好像并不执行,我查看了下/tmp/cron.d里有两个文件,一个就是启动时生成的3322ddns文件,一个是系统自带的check-ps(这个显然被系统执行了)
这个是什么问题,查看了一些相关的linux资料定时任务是在crontab文件里,你的3322ddns文件里的脚本语法和设置都没有问题才对,但并没有定时执行是什么原因呢?我对DD的启动和执行顺序不是很了解,你在设置里有定时任务成功的经验吗?期待你和各位高手的指导:)
ps:dd2.4std管理页面有自带的additional cron job,里面也可以设置定时任务,但也不执行(能在/tmp/cron.d里生成对应的文件),请各位高手指点:
1、dd的启动和执行
2、定时任务如何设置
谢谢大家:)呵呵
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-12-18 12:34 | 显示全部楼层
在线等,昨晚折腾老半天了,郁闷...
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-26 05:32

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表