version 1.107, 2001/04/06 21:00:13 |
version 1.108, 2001/04/07 08:55:18 |
|
|
fprintf(stderr, " -R listen-port:host:port Forward remote port to local address\n"); |
fprintf(stderr, " -R listen-port:host:port Forward remote port to local address\n"); |
fprintf(stderr, " These cause %s to listen for connections on a port, and\n", __progname); |
fprintf(stderr, " These cause %s to listen for connections on a port, and\n", __progname); |
fprintf(stderr, " forward them to the other side by connecting to host:port.\n"); |
fprintf(stderr, " forward them to the other side by connecting to host:port.\n"); |
|
fprintf(stderr, " -D port Dynamically forward local port to multiple remote addresses.\n"); |
|
fprintf(stderr, " Allows SSH to act as an application-layer proxy.\n"); |
|
fprintf(stderr, " Protocols Supported: SOCKS4\n"); |
fprintf(stderr, " -C Enable compression.\n"); |
fprintf(stderr, " -C Enable compression.\n"); |
fprintf(stderr, " -N Do not execute a shell or command.\n"); |
fprintf(stderr, " -N Do not execute a shell or command.\n"); |
fprintf(stderr, " -g Allow remote hosts to connect to forwarded ports.\n"); |
fprintf(stderr, " -g Allow remote hosts to connect to forwarded ports.\n"); |
|
|
opt = av[optind][1]; |
opt = av[optind][1]; |
if (!opt) |
if (!opt) |
usage(); |
usage(); |
if (strchr("eilcmpLRo", opt)) { /* options with arguments */ |
if (strchr("eilcmpLRDo", opt)) { /* options with arguments */ |
optarg = av[optind] + 2; |
optarg = av[optind] + 2; |
if (strcmp(optarg, "") == 0) { |
if (strcmp(optarg, "") == 0) { |
if (optind >= ac - 1) |
if (optind >= ac - 1) |
|
|
} |
} |
add_local_forward(&options, fwd_port, buf, fwd_host_port); |
add_local_forward(&options, fwd_port, buf, fwd_host_port); |
break; |
break; |
|
|
|
case 'D': |
|
fwd_port = atoi(optarg); |
|
add_local_forward(&options, fwd_port, "socks4", 0); |
|
break; |
|
|
case 'C': |
case 'C': |
options.compression = 1; |
options.compression = 1; |
break; |
break; |