-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Configuraion file loaded by moproxy.service | ||
|
||
## TCP listen address | ||
HOST="0.0.0.0" | ||
PORT="2080" | ||
|
||
## Web status page listen on | ||
WEB_BIND="127.0.0.1:8080" | ||
|
||
## List of backend proxy servers | ||
PROXY_LIST="/etc/moproxy/proxy.ini" | ||
|
||
## Other arguments passed to moproxy daemon | ||
DAEMON_ARGS="--stats-bind ${WEB_BIND}" | ||
|
||
## Enable remote DNS | ||
# DAEMON_ARGS="${DAEMON_ARGS} --remote-dns" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[Unit] | ||
Description=MoProxy transparent TCP proxy daemon. | ||
After=network.target | ||
|
||
[Service] | ||
Type=notify | ||
User=nobody | ||
Group=nobody | ||
|
||
Restart=on-failure | ||
EnvironmentFile=/etc/moproxy/config.env | ||
ExecStart=/usr/bin/moproxy -h $HOST -p $PORT --list $PROXY_LIST $DAEMON_ARGS --systemd | ||
|
||
LimitNOFILE=32768 | ||
PrivateTmp=true | ||
PrivateDevices=true | ||
ProtectSystem=strict | ||
ProtectHome=true | ||
ProtectKernelModules=true | ||
ProtectControlGroups=true | ||
|
||
## Wait for WAN interface up | ||
# ExecStartPre=/usr/lib/systemd/systemd-networkd-wait-online --interface=ppp0 | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Example of moproxy server list file. | ||
|
||
# Each server starts with a unique `[SERVER-TAG]`, | ||
# followed by a list of attributes. | ||
# | ||
# Attributes | ||
# - address: IP-addr:port of the server. | ||
# - protocol: HTTP or SOCKSv5. | ||
# - test dns: IP-addr:port of a DNS server with TCP support. | ||
# - score base: A fixed +/- integer added into server's score. | ||
# | ||
# `address` and `protocol` are mandatory, others are optional. | ||
|
||
[server-1] | ||
address=127.0.0.1:2001 | ||
protocol=socks5 | ||
[server-2] | ||
address=127.0.0.1:2002 | ||
protocol=http | ||
test dns=127.0.0.53:53 ;use remote's local dns server to caculate delay | ||
[backup] | ||
address=127.0.0.1:2002 | ||
protocol=socks5 | ||
score base=5000 ;add 5k to pull away from preferred server. |