#!/bin/sh # # $FreeBSD: $ # # PROVIDE: transproxy # REQUIRE: NETWORKING SERVERS ipfw # BEFORE: DAEMON # KEYWORD: shutdown # # Add the following line to /etc/rc.conf to enable transproxy: # # transproxy_enable="YES" # . /etc/rc.subr name=transproxy rcvar=`set_rcvar` start_precmd=${name}_precmd stop_postcmd=${name}_postcmd command=%%PREFIX%%/sbin/tproxy transproxy_port=${transproxy_port:-8081} transproxy_log=${transproxy_log:-"/var/log/transproxy.log"} transproxy_proxyhost=${transproxy_proxyhost:-"proxy"} transproxy_proxyport=${transproxy_proxyport:-3128} transproxy_enable=${transproxy_enable:-"NO"} transproxy_flags="-s $transproxy_port -l $transproxy_log $transproxy_proxyhost $transproxy_proxyport $transproxy_flags" transproxy_precmd () { } transproxy_postcmd () { ipfw delete 10010 10000 10001 >/dev/null } load_rc_config $name run_rc_command "$1"