r_proxy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +8 -1
- data/example.rb +1 -0
- data/lib/r_proxy/master_process.rb +1 -2
- data/lib/r_proxy/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8a74c2bf49d46d1c83f61c84c5d93e489180f73fe6d6bb1a691700db3a55e66
|
4
|
+
data.tar.gz: 03d4d23c639f5b410f3d50260d0d7db241bb0393cbc0c0f1b6a3c2c584a22c4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8cde243c051d33e13a64160f31582a5fed08db3077a470b6823db087c5fcd36092dbaec32d80b51f620b07fe3dd317747ef800bb964ee0e0c2e00ef0cf523b1
|
7
|
+
data.tar.gz: '0903bb936989764a934a10f0c8c3070324f97ec1c3416be22082a97eaaa28283da8ff749faa11d4e3d98ee0d23e25de279f7edaef5e70382cd92b128f5c2cf84'
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# RProxy
|
2
2
|
|
3
|
-
ruby http proxy server, base on eventmachine
|
3
|
+
a powerful ruby http proxy server, base on eventmachine
|
4
4
|
|
5
|
+
able to run in multi-process like nginx works
|
5
6
|
## Installation
|
6
7
|
|
7
8
|
Add this line to your application's Gemfile:
|
@@ -43,6 +44,12 @@ server = RProxy::MasterProcess.new
|
|
43
44
|
server.set(:host, '127.0.0.1')
|
44
45
|
server.set(:port, 8080)
|
45
46
|
|
47
|
+
# set how many instances process that you want to run.
|
48
|
+
# master process will looking after those process,
|
49
|
+
# if any of them exit, will auto re-create new instance.
|
50
|
+
# if want to quit all, just kill master process.
|
51
|
+
server.set(:instances, 3)
|
52
|
+
|
46
53
|
# if disable_auth is true
|
47
54
|
# then server will not auth user and password
|
48
55
|
# server.set(:disable_auth, true)
|
data/example.rb
CHANGED
@@ -15,6 +15,7 @@ module RProxy
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def run!
|
18
|
+
at_exit { stop_all_process }
|
18
19
|
@logger = @config.logger
|
19
20
|
begin
|
20
21
|
start_r_proxy
|
@@ -25,8 +26,6 @@ module RProxy
|
|
25
26
|
@logger.info("master process exit with #{e.message}, #{e.backtrace}") if @logger
|
26
27
|
EventMachine.stop_event_loop if EventMachine.reactor_running?
|
27
28
|
end
|
28
|
-
|
29
|
-
at_exit { stop_all_process }
|
30
29
|
end
|
31
30
|
|
32
31
|
private
|
data/lib/r_proxy/version.rb
CHANGED