xinxinhao 发表于 2013-02-28 11:09

【分享我写的】python http/tcp server

本帖最后由 xinxinhao 于 2014-04-11 15:39 编辑

更新版本,看下面

===========此服务器是我工作时候自己写的============
【参考过python-flup】
【参考过fastcgi/scgi/http1.1协议】
【其他的由于之前写过linux c ,epoll,线程进程,网络,异步,http协议,libevent等相关东西,此次写这个python服务器比较顺利】

此代码运行在linux /python 2.7及其以上环境

运行方式:
解压缩到某个目录,cd gui/ && ./MainServer.py
或者python -O ./MainServer.py

配置文件
gui/conf/server.conf

=========================
1.支持http/tcp 协议
2.支持http post上传文件 (标准http协议的实现)
3.支持http get (标准http协议的实现)
4.支持http cookies
5.支持php (simple fork local cgi)
6.支持fastcgi(数据流到远程fcgi 服务器,取得返回结果,参考过python-flup)
7.支持scgi (数据流到远程scgi 服务器,取得返回结果,参考过python-flup)
8.支持web shell
9.支持http gui 上传文件
10.支持tcp client shell (telnet 到相应的服务端口,输入shell xx)
11.支持日志上传
12.支持普通tcp传文件,(作为tcp 服务器)
13.支持http proxy 透明代理,(简单实现,但是不缓存访问的内容)
14.支持redis 远程存储一些需要的简单的东西(< 4096 bytes),(tcp/http接口)
15.支持部署(此服务器是c/s架构,有client单独的线程,自动从server获取要执行的文件(称为tar包),client下载包,解压缩到本地,fork子进程,执行,并上传执行结果给server)
16.支持http/tcp 下载文件.
17.支持动态web模块方式的页面,
18.其实还有好多功能,这里不详述了,有兴趣的可以看看,(结果我的工作经验写的)


TIPS:这个东西已经是在我的工作中使用了

我的个人project: (目前google已经暂停code 上传,上面的版本是旧的)
http://code.google.com/p/krobots

我的个人github

https://github.com/hmpfish/python-httptcp

git clone https://github.com/hmpfish/python-httptcp.git

xinxinhao 发表于 2013-07-23 10:56

本帖最后由 xinxinhao 于 2014-04-11 15:39 编辑

回复 1# xinxinhao




也可以直接去 :(目前google暂停code的上传,上面版本是旧版的)
http://code.google.com/p/krobots/下载

我的个人github

https://github.com/hmpfish/python-httptcp

git clone https://github.com/hmpfish/python-httptcp.git

xinxinhao 发表于 2014-03-23 11:38

本帖最后由 xinxinhao 于 2014-04-11 15:41 编辑



回复 1# xinxinhao

我的个人github

https://github.com/hmpfish/python-httptcp

git clone https://github.com/hmpfish/python-httptcp.git
   
版本更新

szedwin 发表于 2014-03-24 20:26

赞一个,熟人呀~~

xinxinhao 发表于 2015-01-19 11:07

回复 1# xinxinhao

版本更新,终极版本:








   
页: [1]
查看完整版本: 【分享我写的】python http/tcp server