(机房互通以及在家办公的时候你想访问公司内部相关服务,这个时候经过L2TP能够帮你解决。你只须要L2TP服务便可链接到公司,实现公司与家以及出差移动办公需求。可是随着公司里面申请这样办公方式的人员比较多,企业信息安全与帐户管控问题就暴露了,须要将此服务划入相应管理流程,所以写一个管控系统方便权限划拨人员快速操做与快速收回帐户信息)
python
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz tar zxvf Python-3.6.3.tgz cd Python-3.6.3 ./configure --prefix=/usr/local/python3.6 make make install ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3.6
curl -o https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py speedtest.py chmod u+x speedtest.py chmod u+x speedtest.py ./speedtest.py
pip3.6 install flask pip3.6 install gevent-websocket
mkdir myproject cd myproject/ python3.6 -m venv venv source venv/bin/activate deactivate
代码下载地址: nginx
git@github.com:john966/lt_web.gitgit
lt_web/config/settings.pygithub
filedata_dir = os.path.join(BASE_DIR,"data") #读取您的文件目录 (例如:/etc/系统目录下或者把配置文件放在本系统的data目录下而后以软连接的方式到相关服务的配置目录) filedata_path=os.path.join(filedata_dir,"chap-secrets") # 配置文件 filedata_path_bak = os.path.join(filedata_dir,"chap-secrets.bak") # 备份配置文件 (修改的时候须要使用请必定要与配置文件名称同样) userinfo_path = os.path.join(filedata_dir,"userinfo") # 用户文件
cd myproject/lt_web/;python3.6 manager.py /dev/null 2>&1 &
本系统中data目录下的userinfo下一行行添加帐户与密码信息web
登陆效果:flask
首页展现效果:浏览器
添加效果:安全