socks_tunnel 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -1
- data/lib/socks_tunnel/cli.rb +2 -0
- data/lib/socks_tunnel/config.rb +6 -1
- data/lib/socks_tunnel/local.rb +1 -0
- data/lib/socks_tunnel/remote.rb +1 -0
- data/lib/socks_tunnel/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73ff01f52b156dcdac94e1b8a56d879475f7e419
|
4
|
+
data.tar.gz: 8debcb7067533ad32cba90ea791432a5d2d44f1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c7fc44f586c0c4f368b9b488d2b33967728bb4372a2dc2e240149a8193db9f8f77d302a53af10b8fbb3342fe53813f3c551cb62c44931e53b4382c6f2198e01
|
7
|
+
data.tar.gz: c3fc5c99ec378e817d213ce8ac1b3502617f95fda67e2f26767b7e0e6283cf6a9b321e212fe6a254cfe81ccf72a2f9bcd9aa055d39d38514513d368a5088187d
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# SocksTunnel
|
2
2
|
|
3
|
-
Establish secure tunnel via Socks 5.
|
3
|
+
Establish secure tunnel via Socks 5 base on EventMachine. Recently support TCP only.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -30,6 +30,9 @@ Options
|
|
30
30
|
<tr>
|
31
31
|
<td>--salt</td><td>The salt for generating encryption key and iv.</td><td>Optional</td>
|
32
32
|
</tr>
|
33
|
+
<tr>
|
34
|
+
<td>--daemon</td><td>Run in the background.</td><td>Optional</td>
|
35
|
+
</tr>
|
33
36
|
</table>
|
34
37
|
|
35
38
|
Start remote server
|
@@ -48,6 +51,9 @@ Options
|
|
48
51
|
<tr>
|
49
52
|
<td>--salt</td><td>The salt for generating encryption key and iv.</td><td>Optional</td>
|
50
53
|
</tr>
|
54
|
+
<tr>
|
55
|
+
<td>--daemon</td><td>Run in the background.</td><td>Optional</td>
|
56
|
+
</tr>
|
51
57
|
</table>
|
52
58
|
|
53
59
|
*Password* and *Salt* used in both local and remote server should be the same.
|
data/lib/socks_tunnel/cli.rb
CHANGED
@@ -7,6 +7,7 @@ module SocksTunnel
|
|
7
7
|
option :port, required: true
|
8
8
|
option :password, required: true
|
9
9
|
option :remote_addr, required: true
|
10
|
+
option :daemon, type: :boolean
|
10
11
|
option :host
|
11
12
|
def local
|
12
13
|
Config.from(options)
|
@@ -16,6 +17,7 @@ module SocksTunnel
|
|
16
17
|
desc "remote", "Start remote server"
|
17
18
|
option :port, required: true
|
18
19
|
option :password, required: true
|
20
|
+
option :daemon, type: :boolean
|
19
21
|
def remote
|
20
22
|
Config.from(options)
|
21
23
|
Remote.run
|
data/lib/socks_tunnel/config.rb
CHANGED
@@ -2,7 +2,7 @@ module SocksTunnel
|
|
2
2
|
class Config
|
3
3
|
class << self
|
4
4
|
attr_accessor :local_server_host, :local_server_port,
|
5
|
-
:remote_server_host, :remote_server_port, :password, :salt
|
5
|
+
:remote_server_host, :remote_server_port, :password, :salt, :daemon
|
6
6
|
|
7
7
|
def from(options)
|
8
8
|
if options[:remote_addr]
|
@@ -14,6 +14,7 @@ module SocksTunnel
|
|
14
14
|
end
|
15
15
|
@password = options[:password]
|
16
16
|
@salt = options[:salt] if options[:salt]
|
17
|
+
@daemon = options[:daemon] if options[:daemon]
|
17
18
|
end
|
18
19
|
|
19
20
|
def local_server_host
|
@@ -31,6 +32,10 @@ module SocksTunnel
|
|
31
32
|
def cipher
|
32
33
|
@cipher ||= 'AES-256-CBC'
|
33
34
|
end
|
35
|
+
|
36
|
+
def daemon?
|
37
|
+
!!@daemon
|
38
|
+
end
|
34
39
|
end
|
35
40
|
end
|
36
41
|
end
|
data/lib/socks_tunnel/local.rb
CHANGED
data/lib/socks_tunnel/remote.rb
CHANGED
data/lib/socks_tunnel/version.rb
CHANGED