vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, Here is a patch to nc(1) to stop it from trying to resolve an IP when using an HTTP proxy. (It never uses the IP anyway.) Without this patch, if there are no DNS servers nc will die with `nc: cannot decode address "host.example.com"' error. This change makes nc almost a complete replacement for corkscrew, and I've included an example for the nc manpage. Flames? -Ray- Index: nc.1 ================================================== ================= RCS file: /cvs/src/usr.bin/nc/nc.1,v retrieving revision 1.37 diff -u -r1.37 nc.1 --- nc.1 21 Feb 2005 10:56:22 -0000 1.37 +++ nc.1 19 May 2005 19:21:10 -0000 @@ -378,6 +378,14 @@ port 8080: .Pp .Dl $ nc -x10.2.3.4:8080 -Xconnect host.example.com 42 +.Pp +An +.Xr ssh_config 5 +line to +.Xr ssh 1 +through an HTTP proxy at host.example.com, port 8080: +.Pp +.Dl ProxyCommand /usr/bin/nc -X connect -x host.example.com:8080 %h %p .Sh SEE ALSO .Xr cat 1 .Sh AUTHORS Index: socks.c ================================================== ================= RCS file: /cvs/src/usr.bin/nc/socks.c,v retrieving revision 1.12 diff -u -r1.12 socks.c --- socks.c 19 May 2005 08:40:59 -0000 1.12 +++ socks.c 19 May 2005 19:21:10 -0000 @@ -129,7 +129,9 @@ if (proxyfd < 0) return (-1); - serveraddr = decode_addr(host); + /* HTTP proxies can use hostnames. */ + if (socksv != -1) + serveraddr = decode_addr(host); serverport = decode_port(port); if (socksv == 5) { |