赞
踩
VPS-Proxy 把绑定的客户端列表持久化.
客户端的一些文件
cd "C:\Documents and Settings\Administrator\桌面\" cls if exist "C:\Documents and Settings\Administrator\桌面\socket_client.exe" ( cls echo file has exists... xcopy /E /y "\\tsclient\E\adsl\client\dist\socket_client.exe" "C:\Documents and Settings\Administrator\桌面\socket_client.exe" xcopy /E /y "\\tsclient\E\adsl\client\dist\scripts\run_client.bat" "C:\Documents and Settings\Administrator\桌面\" ) else ( :: copy 压缩squid包, 可以替换为 ftp 形式 copy \\tsclient\F\adsl\client\soft\squid.zip C:\squid.zip :: 解压文件到指定目录, 静默解压 "C:\Program Files\WinRAR\winRar.exe" -o+ x -ibck C:\squid.zip C:\ :: 递归/覆盖copy程序文件 xcopy /E /y "\\tsclient\E\adsl\client\dist\*" "C:\Documents and Settings\Administrator\桌面\" ) "C:\Documents and Settings\Administrator\桌面\socket_client.exe" --client pause
- net stop squid
- :: 撤销 squid 服务
- C:\squid\sbin\squid.exe -r
- :: 注册 squid 服务
- C:\squid\sbin\squid.exe -i
- :: 检查 squid 配置
- C:\squid\sbin\squid.exe -z
- net start squid
- :: pause
- rasdial /disconnect
- :: 暂停2秒
- ping 0 -n 2 -w 1000 > /null
- rasdial 宽带连接 adsl账号 adsl密码
- acl remove_server src 112.74.113.132 # server ip
- http_access allow remove_server
- # 关闭日志文件信息
- access_log none
- cache_log none
- cache_store_log none
- # 关闭源 IP 设置
- via off
- cache_vary off
- forwarded_for off
import sys from distutils.core import setup import py2exe sys.argv.append('py2exe') options = {"py2exe": {"compressed": 1, "optimize": 2, # "ascii": 1, #"includes":["encodings", "encodings.*"], #'dll_excludes': ['w9xpopen.dll', "SHELL32.dll"], "bundle_files": 1 }} setup( options = options, console=[{"script": "socket_client.py"},], #windows=[{"script": "socket_client.py"},], data_files=[ ("scripts",["scripts\\start_client_squid.bat", "scripts\\connect_adsl.bat", "scripts\\account.exe", "run_client.bat",]), ("templates", ["templates\\squid.client.template", "templates\\adsl.client.template"]) ], name = "socket client", author="zhipeng", zipfile=None, )
服务端的一些文件
SQUID_USER="squid" SQUID_PASSWD="proxy_squid" service squid stop # install htpasswd agent, squid server, iptables manager yum install -y screen httpd-tools squid iptables-services # change owner squid.conf chown zhipeng /etc/squid/squid.conf squid -k parse squid -z # create password file htpasswd -c -b /etc/squid/passwd $SQUID_USER $SQUID_PASSWD # 获取本地公网 ip. 仅限阿里云. 如果不可以, 考虑其他方式. ifconfig eth1 |grep inet|awk '{print $2}' > net_ip # copy iptables to sys cp iptables.template /etc/sysconfig/iptables systemctl stop firewalld systemctl mask firewalld systemctl enable iptables service iptables restart service squid start
- service squid stop
- /etc/squid/squid.conf.default > /etc/squid/squid.conf
- squid -k parse > /dev/null
- squid -z > /dev/null
- service squid start
- cat /etc/squid/squid.conf |grep -e "^cache_peer" | awk '{print $2}' | xargs echo "reset adsl ip:"
loc_ip=`ifconfig eth1 |grep inet|awk '{print $2}'` loc_port=4000 daemon="" server="" restart="" setexit="" for i in "$@" do echo check args: [$i] if [[ "$i" == "--daemon" || "$i" == "-d" ]] then daemon="--daemon" echo use daemon .. elif [[ $i == "--server" ]] then server="--server" echo "run server .." elif [[ $i == "--restart" ]] then restart="--restart" echo "restart server .." elif [[ "$i" == "--exit" ]] then setexit="--exit" echo "exit server .." fi done if [[ $setexit == "--exit" && $restart == "--restart" ]] then echo exit: params error, please input --exit or --restart else echo python socket_server.py $loc_ip $loc_port $server $daemon $restart $setexit fi
- # 关闭代理跳转信息
- request_header_access Via deny all
- request_header_access X-Forwarded-For deny all
- # 用户授权
- auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
- acl auth_user proxy_auth REQUIRED
- http_access allow auth_user
-
- # 设置上游代理(本文理解为下游)
- # set parent
- {cache_peer}
- #cache_peer 11.111.11.111 sibling 3128 0 no-query default
- #cache_peer parent 3128 0 no-query default login=user:password
- never_direct allow all
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3828 -j ACCEPT
RDP “alternate shell” not working
Configure the server that will host RemoteApp programs - https://technet.microsoft.com/en-us/library/cc730673(v=ws.10).aspx#BKMK_ConfigureHostServer
Can RDP clients launch remote applications and not desktops
How to enable RemoteApp
Directly access Windows XP applications from Windows 8
RemoteApp for Windows XP and Windows Vista, the missing pieces
RemoteApp on Windows 7, run app
RDP file setting
RDP file setting
how rdp passwords are encrypted
download rdp password builder file. rdp.zip
如何在批次檔(Batch)中實現 sleep 命令讓任務暫停執行 n 秒
winrar压缩和解压的cmd命令
How to check if a file exists from inside a batch file
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。