-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME
75 lines (58 loc) · 2.42 KB
/
README
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
===========================================
Rproxy - twisted based reverse proxy
1.Introduction
2.Install
3.Configuration
4.About
===========================================
--------------
1.Introduction
--------------
The rproxy is a open-source twisted based enhanced reverse proxy that does a lot more than what traditional reverse proxies do:
* Content Replacing: traditional proxies doesn't work when pages are using ABSOLUTE urls, you will end up with visiting the pages directly rather than through reverse proxy. rproxy has content replacing options that can solve this problem for you.
* Global reverse proxy: traditional reverse proxies can only serve the links you are currently visiting, however when the page contains other links that you want to visit through reverse proxy, the only thing you can do is set up another reverse proxy and visit it manually. rproxy can make your reverse proxy "global" so that it will automatically "translate" the links.
* Easy to set up: traditional reverse proxies, such as nginx, squid, though very powerful, is hard to set up, whereas rproxy has very simple and clear web interfaces and self-explained conf files to set up
---------
2.Install
---------
1.1 install git-core,twisted,mako,python-openssl,bitstring
# apt-get install git-core python-openssl python-setuptools python-dev
# easy_install bitstring twisted mako
1.2 download source code
# cd /var/www; git clone git://github.com/observerss/rproxy.git
------------
3.Config&Run
------------
1) pure rproxy
# cd /var/www/rproxy; vi src/rproxy.py
Change PORT->8484,DOMAIN->"yourdomain:8484"
# twistd -y src/rproxy.py
Visit yourdomain:8484, make configuration
2) rproxy+nginx
# vi src/rproxy.py
Change DOMAIN->"yourdomain"
Change PORT->8484
# apt-get install nginx
# vi /etc/nginx/sites-enabled/rproxy
server {
listen 80;
server_name yourdomain *.yourdomain;
root /var/www/rproxy;
location / {
proxy_pass http://127.0.0.1:8484/;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
# nginx -s reload
# cd /var/www/rproxy; twistd -y rproxy.py
Visit yourdomain, make configurations
-------
4.About
-------
rproxy uses LGPLv3 License, see LICENSE
Author: observer
Blog: obmem.info
Email: jingchaohu AT gmail.com