Skip to content

Commit

Permalink
# 修复 显示链接信息功能,不同端口 链接IP显示重复的问题(例如 80 8080端口)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toyo authored Aug 31, 2017
1 parent fd50f0b commit 3b38857
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions ssr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS 6+/Debian 6+/Ubuntu 14.04+
# Description: Install the ShadowsocksR server
# Version: 2.0.29
# Version: 2.0.30
# Author: Toyo
# Blog: https://doub.io/ss-jc42/
#=================================================

sh_ver="2.0.29"
sh_ver="2.0.30"
filepath=$(cd "$(dirname "$0")"; pwd)
file=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
ssr_folder="/usr/local/shadowsocksr"
Expand Down Expand Up @@ -745,7 +745,7 @@ debian_View_user_connection_info(){
now_mode="单端口" && user_total="1"
IP_total=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp6' |awk '{print $5}' |awk -F ":" '{print $1}' |sort -u |wc -l`
user_port=`${jq_file} '.server_port' ${config_user_file}`
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp6' |grep "${user_port}" |awk '{print $5}' |awk -F ":" '{print $1}' |sort -u`
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp6' |grep ":${user_port} " |awk '{print $5}' |awk -F ":" '{print $1}' |sort -u`
if [[ -z ${user_IP_1} ]]; then
user_IP_total="0"
else
Expand Down Expand Up @@ -791,7 +791,7 @@ centos_View_user_connection_info(){
now_mode="单端口" && user_total="1"
IP_total=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp' |grep '::ffff:' |awk '{print $5}' |awk -F ":" '{print $4}' |sort -u |wc -l`
user_port=`${jq_file} '.server_port' ${config_user_file}`
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp' |grep "${user_port}" | grep '::ffff:' |awk '{print $5}' |awk -F ":" '{print $4}' |sort -u`
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp' |grep ":${user_port} " | grep '::ffff:' |awk '{print $5}' |awk -F ":" '{print $4}' |sort -u`
if [[ -z ${user_IP_1} ]]; then
user_IP_total="0"
else
Expand Down
8 changes: 4 additions & 4 deletions ssrmu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export PATH
#=================================================
# System Required: CentOS 6+/Debian 6+/Ubuntu 14.04+
# Description: Install the ShadowsocksR mudbjson server
# Version: 1.0.8
# Version: 1.0.9
# Author: Toyo
# Blog: https://doub.io/ss-jc60/
#=================================================

sh_ver="1.0.8"
sh_ver="1.0.9"
filepath=$(cd "$(dirname "$0")"; pwd)
file=$(echo -e "${filepath}"|awk -F "$0" '{print $1}')
ssr_folder="/usr/local/shadowsocksr"
Expand Down Expand Up @@ -888,7 +888,7 @@ debian_View_user_connection_info(){
for((integer = 1; integer <= ${user_total}; integer++))
do
user_port=$(echo "${user_info}"|sed -n "${integer}p"|awk '{print $4}')
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp6' |grep "${user_port}" |awk '{print $5}' |awk -F ":" '{print $1}' |sort -u`
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp6' |grep ":${user_port} " |awk '{print $5}' |awk -F ":" '{print $1}' |sort -u`
if [[ -z ${user_IP_1} ]]; then
user_IP_total="0"
else
Expand All @@ -915,7 +915,7 @@ centos_View_user_connection_info(){
for((integer = 1; integer <= ${user_total}; integer++))
do
user_port=$(echo "${user_info}"|sed -n "${integer}p"|awk '{print $4}')
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp' |grep "${user_port}"|grep '::ffff:' |awk '{print $5}' |awk -F ":" '{print $4}' |sort -u`
user_IP_1=`netstat -anp |grep 'ESTABLISHED' |grep 'python' |grep 'tcp' |grep ":${user_port} "|grep '::ffff:' |awk '{print $5}' |awk -F ":" '{print $4}' |sort -u`
if [[ -z ${user_IP_1} ]]; then
user_IP_total="0"
else
Expand Down

0 comments on commit 3b38857

Please sign in to comment.