weblink 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG +4 -0
- data/VERSION +1 -1
- data/lib/relay.rb +1 -0
- data/lib/weblink.rb +13 -7
- data.tar.gz.sig +0 -0
- metadata +25 -20
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b02d7b9671293e3f746c7fd1a85e3d53c8fcafa6dff31de008d7b40ec9792c25
|
4
|
+
data.tar.gz: 0f0e8b3e3ee29010a4a391aa8575e3429034269fc3620a926a62f64465522add
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: adb784f27aa8ea87b83db1c19007b20e89214a4e4760309d9b1e44e30db91b6bc802676e2aa7be5c8ac3c02ab833e57e834d2e481e63446dcfe5f5240ba8674b
|
7
|
+
data.tar.gz: 478418bdcb0db36ed9c14153a2ec38d01438c028ec430e4f81772fe4172bc0f422f631f1c1868d01e4a9eef18220097b78e841401656f3db9fb82bef9e7d880d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/relay.rb
CHANGED
data/lib/weblink.rb
CHANGED
@@ -16,11 +16,17 @@ class Weblink
|
|
16
16
|
trap(:EXIT) { Process.waitall }
|
17
17
|
|
18
18
|
if @opts[:client]
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
ip = Socket.getifaddrs.find { |ifa| ifa.addr&.ipv4_private? }
|
20
|
+
if ip
|
21
|
+
public = File.expand_path('../public', __dir__)
|
22
|
+
spawn('ruby', '-run', '-ehttpd', '--', public, err: IO::NULL)
|
23
|
+
puts "Open http://#{ip.addr.ip_address}:8080/ on your other device."
|
24
|
+
else
|
25
|
+
abort(
|
26
|
+
"Could not find an interface to listen on. " \
|
27
|
+
"Make sure that you are connected to your device."
|
28
|
+
)
|
29
|
+
end
|
24
30
|
end
|
25
31
|
|
26
32
|
if @opts[:server]
|
@@ -68,14 +74,14 @@ class Weblink
|
|
68
74
|
return
|
69
75
|
end
|
70
76
|
xff = handshake.headers_downcased['x-forwarded-for']
|
71
|
-
with_retry(3) do
|
77
|
+
with_retry(timeout: 3) do
|
72
78
|
EventMachine.connect(socket, Relay, 'server', xff) do |rel|
|
73
79
|
rel.start(ws)
|
74
80
|
end
|
75
81
|
end
|
76
82
|
end
|
77
83
|
|
78
|
-
def with_retry(timeout
|
84
|
+
def with_retry(timeout:, wait: 0.1)
|
79
85
|
elapsed = 0
|
80
86
|
begin
|
81
87
|
yield
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weblink
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- soylent
|
@@ -10,25 +10,30 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
MIIEDjCCAvagAwIBAgIBATANBgkqhkiG9w0BAQsFADB3MRgwFgYDVQQDDA8xNTkz
|
14
|
+
ODYwX3NveWxlbnQxFTATBgoJkiaJk/IsZAEZFgV1c2VyczEXMBUGCgmSJomT8ixk
|
15
|
+
ARkWB25vcmVwbHkxFjAUBgoJkia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AANmc+s
|
30
|
+
CvV3lD5XtFuw838TbWrqgN+7dVkzQYERTz8DjPtx+zlgzNS3GyMWNUZdOPLo/YkR
|
31
|
+
S7KfmAZlZhy1rcrARYsAouvP+1QttbiJ32L+z1JzAz2s1+4ySgl1OaQfosS04QGT
|
32
|
+
CnJ982/OGeG5xm7KFOqSzG4KnyEy4VH47aE4IQk+yP6R96neHdfOd/C7BcA6gbgH
|
33
|
+
lyshHS0Bgr1OKk3Vx8GtaIa7L9Z4RN0EWBL3QGlhiu55PrpPuAFDDuORJfpIqrph
|
34
|
+
XjC/3xZEDxBLYSjeFIgUMN6+/XGduQANkZ6167QsVu/yPg==
|
30
35
|
-----END CERTIFICATE-----
|
31
|
-
date:
|
36
|
+
date: 2022-01-27 00:00:00.000000000 Z
|
32
37
|
dependencies:
|
33
38
|
- !ruby/object:Gem::Dependency
|
34
39
|
name: em-websocket
|
@@ -83,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
88
|
- !ruby/object:Gem::Version
|
84
89
|
version: '0'
|
85
90
|
requirements: []
|
86
|
-
rubygems_version: 3.
|
91
|
+
rubygems_version: 3.3.4
|
87
92
|
signing_key:
|
88
93
|
specification_version: 4
|
89
94
|
summary: Web browser gateway
|
metadata.gz.sig
CHANGED
Binary file
|