version 1.321, 2008/10/09 06:54:22 |
version 1.322, 2008/11/01 17:40:33 |
|
|
break; |
break; |
|
|
case 'L': |
case 'L': |
if (parse_forward(&fwd, optarg)) |
if (parse_forward(&fwd, optarg, 0)) |
add_local_forward(&options, &fwd); |
add_local_forward(&options, &fwd); |
else { |
else { |
fprintf(stderr, |
fprintf(stderr, |
|
|
break; |
break; |
|
|
case 'R': |
case 'R': |
if (parse_forward(&fwd, optarg)) { |
if (parse_forward(&fwd, optarg, 0)) { |
add_remote_forward(&options, &fwd); |
add_remote_forward(&options, &fwd); |
} else { |
} else { |
fprintf(stderr, |
fprintf(stderr, |
|
|
break; |
break; |
|
|
case 'D': |
case 'D': |
cp = p = xstrdup(optarg); |
if (parse_forward(&fwd, optarg, 1)) { |
memset(&fwd, '\0', sizeof(fwd)); |
add_local_forward(&options, &fwd); |
fwd.connect_host = "socks"; |
|
if ((fwd.listen_host = hpdelim(&cp)) == NULL) { |
|
fprintf(stderr, "Bad dynamic forwarding " |
|
"specification '%.100s'\n", optarg); |
|
exit(255); |
|
} |
|
if (cp != NULL) { |
|
fwd.listen_port = a2port(cp); |
|
fwd.listen_host = |
|
cleanhostname(fwd.listen_host); |
|
} else { |
} else { |
fwd.listen_port = a2port(fwd.listen_host); |
fprintf(stderr, |
fwd.listen_host = NULL; |
"Bad dynamic forwarding specification " |
} |
"'%s'\n", optarg); |
|
|
if (fwd.listen_port == 0) { |
|
fprintf(stderr, "Bad dynamic port '%s'\n", |
|
optarg); |
|
exit(255); |
exit(255); |
} |
} |
add_local_forward(&options, &fwd); |
|
xfree(p); |
|
break; |
break; |
|
|
case 'C': |
case 'C': |