Changeset 3919
- Timestamp:
- 09/12/06 02:13:51 (3 years ago)
- Files:
-
- src/router/httpd/modules/ddns.c (modified) (2 diffs)
- src/router/inadyn/src/dyndns.c (modified) (5 diffs)
- src/router/inadyn/src/dyndns.h (modified) (3 diffs)
- src/router/inadyn/src/inadyn_cmd.c (modified) (1 diff)
- src/router/kromo/cisco_wrt54g_en/DDNS.asp (modified) (10 diffs)
- src/router/services/ddns.c (modified) (2 diffs)
- src/router/services/defaults.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/router/httpd/modules/ddns.c
r3819 r3919 66 66 char *enable, *username, *passwd, *hostname, *dyndnstype, *wildcard, *custom, *conf, *url; 67 67 struct variable ddns_variables[] = { 68 {longname: "DDNS enable", argv:ARGV ("0", "1", "2", "3", "4", "5", "6", "7" )},68 {longname: "DDNS enable", argv:ARGV ("0", "1", "2", "3", "4", "5", "6", "7", "8")}, 69 69 {longname: "DDNS password", argv:ARGV ("30")}, 70 70 }, *which; … … 144 144 snprintf (_wildcard, sizeof (_wildcard), "ddns_wildcard_%s", enable); 145 145 } 146 else if (atoi (enable) == 8) 147 { // tzo 148 snprintf (_username, sizeof (_username), "ddns_username_%s", enable); 149 snprintf (_passwd, sizeof (_passwd), "ddns_passwd_%s", enable); 150 snprintf (_hostname, sizeof (_hostname), "ddns_hostname_%s", enable); 151 } 146 152 147 153 username = websGetVar (wp, _username, NULL); src/router/inadyn/src/dyndns.c
r3817 r3919 50 50 static int get_req_for_noip_http_dns_server(DYN_DNS_CLIENT *p_self, int cnt, DYNDNS_SYSTEM *p_sys_info); 51 51 static int get_req_for_easydns_http_dns_server(DYN_DNS_CLIENT *p_self, int cnt, DYNDNS_SYSTEM *p_sys_info); 52 static int get_req_for_tzo_http_dns_server(DYN_DNS_CLIENT *p_self, int cnt, DYNDNS_SYSTEM *p_sys_info); 52 53 53 54 static BOOL is_dyndns_server_rsp_ok( DYN_DNS_CLIENT *p_self, char*p_rsp, char* p_ok_string); … … 56 57 static BOOL is_zoneedit_server_rsp_ok( DYN_DNS_CLIENT *p_self, char*p_rsp, char* p_ok_string); 57 58 static BOOL is_easydns_server_rsp_ok( DYN_DNS_CLIENT *p_self, char*p_rsp, char* p_ok_string); 59 static BOOL is_tzo_server_rsp_ok( DYN_DNS_CLIENT *p_self, char*p_rsp, char* p_ok_string); 58 60 59 61 DYNDNS_SYSTEM_INFO dns_system_table[] = … … 119 121 DYNDNS_3322_MY_DNS_SERVER, DYNDNS_3322_MY_DNS_SERVER_URL, NULL}}, 120 122 123 {TZO_DEFAULT, 124 {"default@tzo.com", NULL, 125 (DNS_SYSTEM_SRV_RESPONSE_OK_FUNC)is_tzo_server_rsp_ok, 126 (DNS_SYSTEM_REQUEST_FUNC) get_req_for_tzo_http_dns_server, 127 DYNDNS_MY_IP_SERVER, DYNDNS_MY_IP_SERVER_URL, 128 "cgi.tzo.com", "/webclient/signedon.html?TZOName=", ""}}, 129 121 130 {CUSTOM_HTTP_BASIC_AUTH, 122 131 {"custom@http_svr_basic_auth", NULL, … … 229 238 ); 230 239 } 240 static int get_req_for_tzo_http_dns_server(DYN_DNS_CLIENT *p_self, int cnt, DYNDNS_SYSTEM *p_sys_info) 241 { 242 (void)p_sys_info; 243 return sprintf(p_self->p_req_buffer, GENERIC_TZO_AUTH_MY_IP_REQUEST_FORMAT, 244 p_self->info.dyndns_server_url, 245 p_self->alias_info.names[cnt].name, 246 p_self->info.credentials.my_username, 247 p_self->info.credentials.my_password, 248 p_self->info.my_ip_address.name, 249 p_self->info.dyndns_server_name.name 250 ); 251 } 231 252 232 253 static int get_req_for_ip_server(DYN_DNS_CLIENT *p_self, void *p_specific_data) … … 431 452 { 432 453 return (strstr(p_rsp, "NOERROR") != NULL); 454 } 455 456 /** 457 If we have an HTTP 302 the update wasn't good and we're being redirected 458 */ 459 BOOL is_tzo_server_rsp_ok( DYN_DNS_CLIENT *p_self, char*p_rsp, char* p_ok_string) 460 { 461 return (strstr(p_rsp, " HTTP/1.%*c 302") == NULL); 433 462 } 434 463 src/router/inadyn/src/dyndns.h
r3817 r3919 28 28 #include "debug_if.h" 29 29 30 #define DYNDNS_VERSION_STRING "0.1 "30 #define DYNDNS_VERSION_STRING "0.1.4" 31 31 #define DYNDNS_AGENT_NAME "inadyn advanced/" DYNDNS_VERSION_STRING 32 32 #define DYNDNS_EMAIL_ADDR "software@stevehorbachuk.com" … … 43 43 NOIP_DEFAULT, 44 44 EASYDNS_DEFAULT, 45 TZO_DEFAULT, 45 46 DYNDNS_3322_DYNAMIC, 46 47 LAST_DNS_SYSTEM = -1 … … 144 145 "User-Agent: "DYNDNS_AGENT_NAME " " DYNDNS_EMAIL_ADDR"\r\n\r\n" 145 146 147 /** tzo doesnt encode password 148 */ 149 #define GENERIC_TZO_AUTH_MY_IP_REQUEST_FORMAT \ 150 "GET %s%s&" \ 151 "Email=%s&" \ 152 "TZOKey=%s&"\ 153 "IPAddress=%s "\ 154 "HTTP/1.0\r\n" \ 155 "Host: %s\r\n" \ 156 "User-Agent: "DYNDNS_AGENT_NAME " " DYNDNS_EMAIL_ADDR"\r\n\r\n" 157 146 158 #define DYNDNS_OK_RESPONSE "good" 147 159 #define DYNDNS_OK_NOCHANGE "nochg" src/router/inadyn/src/inadyn_cmd.c
r3817 r3919 110 110 "\t\t-For no-ip.com: default@no-ip.com\n" 111 111 "\t\t-For easydns.com: default@easydns.com\n" 112 "\t\t-For tzo.com: default@tzo.com\n" 112 113 "\t\t-For 3322.org: dyndns@3322.org\n" 113 114 "\t\t-For generic: custom@http_svr_basic_auth\n" src/router/kromo/cisco_wrt54g_en/DDNS.asp
r3803 r3919 37 37 hostname = eval("F.ddns_hostname_"+F.ddns_enable.value); 38 38 wildcard = eval("F.ddns_wildcard_"+F.ddns_enable.value); 39 } else if(F.ddns_enable.value == 8) { 40 username = eval("F.ddns_username_"+F.ddns_enable.value); 41 passwd = eval("F.ddns_passwd_"+F.ddns_enable.value); 42 hostname = eval("F.ddns_hostname_"+F.ddns_enable.value); 39 43 } else if(F.ddns_enable.value == 5) { 40 44 username = eval("F.ddns_username_"+F.ddns_enable.value); … … 128 132 <option value="6" <% nvram_selmatch("ddns_enable", "6", "selected"); %> >3322.org</option> 129 133 <option value="7" <% nvram_selmatch("ddns_enable", "7", "selected"); %> >easyDNS.com</option> 134 <option value="8" <% nvram_selmatch("ddns_enable", "8", "selected"); %> >TZO.com</option> 130 135 <script type="text/javascript">document.write("<option value=\"5\" <% nvram_selmatch("ddns_enable", "5", "selected"); %> >" + ddns.custom + "</option>");</script> 131 136 </select> … … 140 145 <% nvram_selmatch("ddns_enable","6","<!--"); %> 141 146 <% nvram_selmatch("ddns_enable","7","<!--"); %> 147 <% nvram_selmatch("ddns_enable","8","<!--"); %> 142 148 <div class="setting"> 143 149 <div class="label"><% tran("share.usrname"); %></div> … … 170 176 <% nvram_selmatch("ddns_enable","6","-->"); %> 171 177 <% nvram_selmatch("ddns_enable","7","-->"); %> 172 173 174 175 <% nvram_selmatch("ddns_enable","1","<!--"); %> 176 <% nvram_selmatch("ddns_enable","3","<!--"); %> 177 <% nvram_selmatch("ddns_enable","4","<!--"); %> 178 <% nvram_selmatch("ddns_enable","5","<!--"); %> 179 <% nvram_selmatch("ddns_enable","6","<!--"); %> 180 <% nvram_selmatch("ddns_enable","7","<!--"); %> 178 <% nvram_selmatch("ddns_enable","8","-->"); %> 179 180 181 182 <% nvram_selmatch("ddns_enable","1","<!--"); %> 183 <% nvram_selmatch("ddns_enable","3","<!--"); %> 184 <% nvram_selmatch("ddns_enable","4","<!--"); %> 185 <% nvram_selmatch("ddns_enable","5","<!--"); %> 186 <% nvram_selmatch("ddns_enable","6","<!--"); %> 187 <% nvram_selmatch("ddns_enable","7","<!--"); %> 188 <% nvram_selmatch("ddns_enable","8","<!--"); %> 181 189 <div class="setting"> 182 190 <div class="label"><% tran("share.usrname"); %></div> … … 197 205 <% nvram_selmatch("ddns_enable","6","-->"); %> 198 206 <% nvram_selmatch("ddns_enable","7","-->"); %> 199 200 201 202 <% nvram_selmatch("ddns_enable","1","<!--"); %> 203 <% nvram_selmatch("ddns_enable","2","<!--"); %> 204 <% nvram_selmatch("ddns_enable","4","<!--"); %> 205 <% nvram_selmatch("ddns_enable","5","<!--"); %> 206 <% nvram_selmatch("ddns_enable","6","<!--"); %> 207 <% nvram_selmatch("ddns_enable","7","<!--"); %> 207 <% nvram_selmatch("ddns_enable","8","-->"); %> 208 209 210 211 <% nvram_selmatch("ddns_enable","1","<!--"); %> 212 <% nvram_selmatch("ddns_enable","2","<!--"); %> 213 <% nvram_selmatch("ddns_enable","4","<!--"); %> 214 <% nvram_selmatch("ddns_enable","5","<!--"); %> 215 <% nvram_selmatch("ddns_enable","6","<!--"); %> 216 <% nvram_selmatch("ddns_enable","7","<!--"); %> 217 <% nvram_selmatch("ddns_enable","8","<!--"); %> 208 218 <div class="setting"> 209 219 <div class="label"><% tran("share.usrname"); %></div> … … 224 234 <% nvram_selmatch("ddns_enable","6","-->"); %> 225 235 <% nvram_selmatch("ddns_enable","7","-->"); %> 226 227 228 229 <% nvram_selmatch("ddns_enable","1","<!--"); %> 230 <% nvram_selmatch("ddns_enable","2","<!--"); %> 231 <% nvram_selmatch("ddns_enable","3","<!--"); %> 232 <% nvram_selmatch("ddns_enable","5","<!--"); %> 233 <% nvram_selmatch("ddns_enable","6","<!--"); %> 234 <% nvram_selmatch("ddns_enable","7","<!--"); %> 236 <% nvram_selmatch("ddns_enable","8","-->"); %> 237 238 239 240 <% nvram_selmatch("ddns_enable","1","<!--"); %> 241 <% nvram_selmatch("ddns_enable","2","<!--"); %> 242 <% nvram_selmatch("ddns_enable","3","<!--"); %> 243 <% nvram_selmatch("ddns_enable","5","<!--"); %> 244 <% nvram_selmatch("ddns_enable","6","<!--"); %> 245 <% nvram_selmatch("ddns_enable","7","<!--"); %> 246 <% nvram_selmatch("ddns_enable","8","<!--"); %> 235 247 <div class="setting"> 236 248 <div class="label"><% tran("share.usrname"); %></div> … … 251 263 <% nvram_selmatch("ddns_enable","6","-->"); %> 252 264 <% nvram_selmatch("ddns_enable","7","-->"); %> 253 254 255 256 <% nvram_selmatch("ddns_enable","1","<!--"); %> 257 <% nvram_selmatch("ddns_enable","2","<!--"); %> 258 <% nvram_selmatch("ddns_enable","3","<!--"); %> 259 <% nvram_selmatch("ddns_enable","4","<!--"); %> 260 <% nvram_selmatch("ddns_enable","5","<!--"); %> 261 <% nvram_selmatch("ddns_enable","7","<!--"); %> 265 <% nvram_selmatch("ddns_enable","8","-->"); %> 266 267 268 269 <% nvram_selmatch("ddns_enable","1","<!--"); %> 270 <% nvram_selmatch("ddns_enable","2","<!--"); %> 271 <% nvram_selmatch("ddns_enable","3","<!--"); %> 272 <% nvram_selmatch("ddns_enable","4","<!--"); %> 273 <% nvram_selmatch("ddns_enable","5","<!--"); %> 274 <% nvram_selmatch("ddns_enable","7","<!--"); %> 275 <% nvram_selmatch("ddns_enable","8","<!--"); %> 262 276 <div class="setting"> 263 277 <div class="label"><% tran("share.usrname"); %></div> … … 288 302 <% nvram_selmatch("ddns_enable","5","-->"); %> 289 303 <% nvram_selmatch("ddns_enable","7","-->"); %> 290 291 292 293 <% nvram_selmatch("ddns_enable","1","<!--"); %> 294 <% nvram_selmatch("ddns_enable","2","<!--"); %> 295 <% nvram_selmatch("ddns_enable","3","<!--"); %> 296 <% nvram_selmatch("ddns_enable","4","<!--"); %> 297 <% nvram_selmatch("ddns_enable","5","<!--"); %> 298 <% nvram_selmatch("ddns_enable","6","<!--"); %> 304 <% nvram_selmatch("ddns_enable","8","-->"); %> 305 306 307 308 <% nvram_selmatch("ddns_enable","1","<!--"); %> 309 <% nvram_selmatch("ddns_enable","2","<!--"); %> 310 <% nvram_selmatch("ddns_enable","3","<!--"); %> 311 <% nvram_selmatch("ddns_enable","4","<!--"); %> 312 <% nvram_selmatch("ddns_enable","5","<!--"); %> 313 <% nvram_selmatch("ddns_enable","6","<!--"); %> 314 <% nvram_selmatch("ddns_enable","8","<!--"); %> 299 315 <div class="setting"> 300 316 <div class="label"><% tran("share.usrname"); %></div> … … 319 335 <% nvram_selmatch("ddns_enable","5","-->"); %> 320 336 <% nvram_selmatch("ddns_enable","6","-->"); %> 321 322 323 324 <% nvram_selmatch("ddns_enable","1","<!--"); %> 325 <% nvram_selmatch("ddns_enable","2","<!--"); %> 326 <% nvram_selmatch("ddns_enable","3","<!--"); %> 327 <% nvram_selmatch("ddns_enable","4","<!--"); %> 328 <% nvram_selmatch("ddns_enable","6","<!--"); %> 329 <% nvram_selmatch("ddns_enable","7","<!--"); %> 337 <% nvram_selmatch("ddns_enable","8","-->"); %> 338 339 340 341 <% nvram_selmatch("ddns_enable","1","<!--"); %> 342 <% nvram_selmatch("ddns_enable","2","<!--"); %> 343 <% nvram_selmatch("ddns_enable","3","<!--"); %> 344 <% nvram_selmatch("ddns_enable","4","<!--"); %> 345 <% nvram_selmatch("ddns_enable","5","<!--"); %> 346 <% nvram_selmatch("ddns_enable","6","<!--"); %> 347 <% nvram_selmatch("ddns_enable","7","<!--"); %> 348 <div class="setting"> 349 <div class="label"><% tran("share.usrname"); %></div> 350 <input name="ddns_username_8" size="30" maxlength="32" onblur="valid_name(this,share.usrname)" value="<% nvram_get("ddns_username_8"); %>" /> 351 </div> 352 <div class="setting"> 353 <div class="label"><% tran("share.passwd"); %></div> 354 <input type="password" name="ddns_passwd_8" size="30" maxlength="32" onblur="valid_name(this,share.passwd)" value="<% nvram_invmatch("ddns_passwd_8","","d6nw5v1x2pc7st9m"); %>" /> 355 </div> 356 <div class="setting"> 357 <div class="label"><% tran("share.hostname"); %></div> 358 <input name="ddns_hostname_8" size="42" onblur="valid_name(this,share.hostname)" value="<% nvram_get("ddns_hostname_8"); %>" /> 359 </div> 360 <% nvram_selmatch("ddns_enable","1","-->"); %> 361 <% nvram_selmatch("ddns_enable","2","-->"); %> 362 <% nvram_selmatch("ddns_enable","3","-->"); %> 363 <% nvram_selmatch("ddns_enable","4","-->"); %> 364 <% nvram_selmatch("ddns_enable","5","-->"); %> 365 <% nvram_selmatch("ddns_enable","6","-->"); %> 366 <% nvram_selmatch("ddns_enable","7","-->"); %> 367 368 369 370 <% nvram_selmatch("ddns_enable","1","<!--"); %> 371 <% nvram_selmatch("ddns_enable","2","<!--"); %> 372 <% nvram_selmatch("ddns_enable","3","<!--"); %> 373 <% nvram_selmatch("ddns_enable","4","<!--"); %> 374 <% nvram_selmatch("ddns_enable","6","<!--"); %> 375 <% nvram_selmatch("ddns_enable","7","<!--"); %> 376 <% nvram_selmatch("ddns_enable","8","<!--"); %> 330 377 <div class="setting"> 331 378 <div class="label"><% tran("ddns.system"); %></div> … … 362 409 </div> 363 410 <% nvram_invmatch("expert_mode","1","-->"); %> 364 <% nvram_selmatch("ddns_enable","1","-->"); %> 365 <% nvram_selmatch("ddns_enable","2","-->"); %> 366 <% nvram_selmatch("ddns_enable","3","-->"); %> 367 <% nvram_selmatch("ddns_enable","4","-->"); %> 368 <% nvram_selmatch("ddns_enable","6","-->"); %> 369 <% nvram_selmatch("ddns_enable","7","-->"); %> 411 412 <% nvram_selmatch("ddns_enable","1","-->"); %> 413 <% nvram_selmatch("ddns_enable","2","-->"); %> 414 <% nvram_selmatch("ddns_enable","3","-->"); %> 415 <% nvram_selmatch("ddns_enable","4","-->"); %> 416 <% nvram_selmatch("ddns_enable","6","-->"); %> 417 <% nvram_selmatch("ddns_enable","7","-->"); %> 418 <% nvram_selmatch("ddns_enable","8","-->"); %> 370 419 </fieldset><br /> 371 420 <fieldset> src/router/services/ddns.c
r3866 r3919 82 82 flag = 7; 83 83 } 84 else if (nvram_match ("ddns_enable", "8")) 85 { 86 strcpy (service, "default@tzo.com"); 87 flag = 8; 88 } 84 89 85 90 /* botho 30/07/06 : add www.3322.org */ … … 132 137 snprintf (_hostname, sizeof (_hostname), "%s", "ddns_hostname_7"); 133 138 snprintf (_wildcard, sizeof (_wildcard), "%s", "ddns_wildcard_7"); 139 } 140 else if (flag == 8) 141 { 142 snprintf (_username, sizeof (_username), "%s", "ddns_username_8"); 143 snprintf (_passwd, sizeof (_passwd), "%s", "ddns_passwd_8"); 144 snprintf (_hostname, sizeof (_hostname), "%s", "ddns_hostname_8"); 134 145 } 135 146 src/router/services/defaults.c
r3907 r3919 998 998 {"ddns_hostname_7", "", 0}, 999 999 {"ddns_wildcard_7", "", 0}, 1000 // for tzo.com 1001 {"ddns_username_8", "", 0}, 1002 {"ddns_passwd_8", "", 0}, 1003 {"ddns_hostname_8", "", 0}, 1000 1004 1001 1005 /* for last value */
