Created
June 6, 2023 22:39
-
-
Save jack828/0ae09b1a6a2d9fd983a1b50410ad0f98 to your computer and use it in GitHub Desktop.
wireproxy freebsd rc.d script
This file contains hidden or 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
### Get this file from Mullvad | |
## https://mullvad.net/en/account/#/wireguard-config | |
[Interface] | |
PrivateKey = <snip> | |
Address = 10.65.0.190/32,fc00:bbbb:bbbb:bb01::2:bd/128 | |
DNS = 10.64.0.1 | |
[Peer] | |
PublicKey = <snop> | |
AllowedIPs = 0.0.0.0/0,::0/0 | |
Endpoint = 185.248.85.3:51820 |
This file contains hidden or 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
WGConfig = /usr/local/wireproxy/mullvad-wg.conf | |
# TCPClientTunnel is a tunnel listening on your machine, | |
# and it forwards any TCP traffic received to the specified target via wireguard. | |
# Flow: | |
# <an app on your LAN> --> localhost:25565 --(wireguard)--> play.cubecraft.net:25565 | |
#[TCPClientTunnel] | |
#BindAddress = 127.0.0.1:25565 | |
#Target = play.cubecraft.net:25565 | |
# TCPServerTunnel is a tunnel listening on wireguard, | |
# and it forwards any TCP traffic received to the specified target via local network. | |
# Flow: | |
# <an app on your wireguard network> --(wireguard)--> 172.16.31.2:3422 --> localhost:25545 | |
#[TCPServerTunnel] | |
#ListenPort = 3422 | |
#Target = localhost:25545 | |
# Socks5 creates a socks5 proxy on your LAN, and all traffic would be routed via wireguard. | |
[Socks5] | |
BindAddress = 0.0.0.0:25344 | |
# Socks5 authentication parameters, specifying username and password enables | |
# proxy authentication. | |
#Username = ... | |
# Avoid using spaces in the password field | |
#Password = ... | |
# http creates a http proxy on your LAN, and all traffic would be routed via wireguard. | |
[http] | |
BindAddress = 0.0.0.0:25345 | |
# HTTP authentication parameters, specifying username and password enables | |
# proxy authentication. | |
#Username = ... | |
# Avoid using spaces in the password field | |
#Password = ... |
This file contains hidden or 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
#!/bin/sh | |
# PROVIDE: wireproxy | |
# REQUIRE: LOGIN | |
# KEYWORD: shutdown | |
. /etc/rc.subr | |
name=wireproxy | |
rcvar=wireproxy_enable | |
load_rc_config $name | |
: ${wireproxy_enable="NO"} | |
: ${wireproxy_config:="/usr/local/wireproxy/wireproxy.conf"} | |
pidfile="/var/run/${name}.pid" | |
procname=/usr/local/wireproxy/wireproxy | |
command=/usr/sbin/daemon | |
command_args="-S -T ${name} -f -p ${pidfile} -u root /usr/local/wireproxy/wireproxy -c ${wireproxy_config}" | |
run_rc_command "$1" | |
## Wireproxy | |
# https://github.com/pufferffish/wireproxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment