-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsocks.1
80 lines (77 loc) · 2.1 KB
/
socks.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.Dd $Mdocdate$
.Dt SOCKS 1
.Sh NAME
.Nm socks
.Nd UCSPI socks proxy client
.Sh SYNOPSIS
.Nm tcpclient
.Ar proxy-host
.Ar proxy-port Nm socks
.Ar host
.Ar port
.Ar program
.Op arguments
.Sh DESCRIPTION
The
.Nm
utility is a socks proxy handler for a UCSPI execchain.
It communicates with tcpclient over pipes with filedescriptor 6 and 7.
tcpclient connects to the socks proxy and delegates the further protocol
handling to
.Nm socks .
socks talks with the socks proxy and initiates a tcp connection to
.Ar host
with
.Ar port .
After connection initiation
.Nm
executes
.Ar program
with
.Ar arguments .
.Sh ENVIRONMENT
The following environment variables are defined in the UCPSI specification.
By the usage of
.Nm socks
there are two TCP connections.
One from the
.Nm tcpclient
to the socks proxy and an other from the socks proxy to the server.
The
.Nm socks
programm tries to handel this in a transparant way for the program.
All variables which are set from tcpclient to describe the TCP connection
between program and proxy are overwritten with the description of the TCP
connection between proxy and server.
Additionally variables are set to describe the connection between program
and proxy.
SOCKSLOCAL TCPLOCAL
| |
program <--> proxy <--> server
| |
SOCKSREMOTE TCPREMOTE
.Bl -tag -width Ds
.It Ev PROTO
Is set to TCP.
.It Ev TCPLOCALHOST Ev TCPLOCALIP Ev TCPLOCALPORT
These variables are set to the hostname, IP address and port number of the
local socks proxy address.
.It Ev TCPREMOTEHOST Ev TCPREMOTEIP Ev TCPREMOTEPORT
These variables are set to the hostname, IP address and port number of the
server.
.It Ev SOCKSLOCALHOST Ev SOCKSLOCALIP Ev SOCKSLOCALPORT
These variables are set to the hostname, IP address and port number of the
tcpclient local side.
.It Ev SOCKSREMOTEHOST Ev SOCKSREMOTEIP Ev SOCKSREMOTEPORT
These variables are set to the hostname, IP address and port number of the
socks proxy server side.
.El
.\".Sh EXIT STATUS
.\".Sh EXAMPLES
.Sh SEE ALSO
.Xr tcpclient 1 ,
.Xr socks 1
.Sh STANDARDS
RFC 1928, SOCKS version 5
.Sh AUTHORS
This program was written by Jan Klemkow.