Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Sep 6, 2017
1 parent 1783496 commit 891e544
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iptables-pf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ Set_local_port(){
echo && echo -e " 本地监听端口 : ${Red_font_prefix}${local_port}${Font_color_suffix}" && echo
}
Set_local_ip(){
stty erase '^H' && read -p "请输入 本服务器的 公网IP(回车自动检测):" local_ip
stty erase '^H' && read -p "请输入 本服务器的 网卡IP(注意是网卡绑定的IP,而不仅仅是公网IP,回车自动检测):" local_ip
if [[ -z "${local_ip}" ]]; then
local_ip=$(wget -qO- -t1 -T2 ipinfo.io/ip)
if [[ -z "${local_ip}" ]]; then
echo "${Error} 无法检测到本服务器的公网IP,请手动输入"
stty erase '^H' && read -p "请输入 本服务器的 公网IP:" local_ip
stty erase '^H' && read -p "请输入 本服务器的 网卡IP(注意是网卡绑定的IP,而不仅仅是公网IP):" local_ip
[[ -z "${local_ip}" ]] && echo "取消..." && exit 1
fi
fi
Expand Down

0 comments on commit 891e544

Please sign in to comment.