1 Star 0 Fork 1

jcleng / kangle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

kangle

开源版本的kangle服务器

  • 只是修改了错误页面的版权链接,在/src/HttpCore.cpp文件里面
  • 管理页面的版权在/src/KHttpManage.cpp文件里面
  • 管理统计在/src/KHttpManage.cpp文件里面
  • 全局常量在/src/global.h文件里面,可修改Response头信息,如Server: kangle/3.5.13.2(实际在/src/KUploadProgressMark.h文件里面)

安装教程

  1. clone源码执行yum -y install wget make automake gcc gcc-c++ pcre-devel zlib-devel sqlite-devel openssl-devel libaio-devel
  2. 进入文件夹./configure --prefix=/vhs/kangle --enable-disk-cache --enable-ipv6 --enable-ssl --enable-vh-limit
  3. 继续make && make install

使用说明

  1. 启动/vhs/kangle/bin/kangle
  2. 进入http://ip:3311
  3. 账号admin密码kangle

安装php 链接

其他 添加kangle的请求规则,文件在/vhs/kangle/etc/config.xml,在<request action='vhs' >增加表BEGIN2

<table name='BEGIN2'>
	<chain  action='deny'  name='k_webshell'>
		<mark_post_file   filename='\.(php|phps|php5|php7|jsp|jspx|asp|aspx|asa|asax|ascx|ashx|asmx|axd|html|htm|js)$' icase='1'></mark_post_file>
	</chain>
	<chain  action='deny'  name='k_asp_loophole'>
		<acl_reg_path  nc='1' path='\.(asp|aspx|asa|asax|ascx|ashx|asmx|axd)[;/]'></acl_reg_path>
	</chain>
	<chain  action='deny'  name='k_htaccess'>
		<acl_url  nc='1'><![CDATA[\.(htaccess|uini)]]></acl_url>
	</chain>
	<chain  action='deny'  name='k_file'>
		<acl_url  nc='1'><![CDATA[(web\.config|httpd\.ini)]]></acl_url>
	</chain>
	<chain  action='continue'  name='k_realip'>
		<mark_replace_ip   header='X-Forwarded-For' > </mark_replace_ip>
	</chain>
	<chain  action='continue' >
		<acl_host  split='|'></acl_host>
	</chain>
</table>

添加之后,在BEGIN里面引用BEGIN2,即可实现规则

使用技巧

防盗链

访问wz.lxx123.club/web/resource/目录里面进行302重定向http://wz.lxx123.club/web/index.php, Refererheader模块里面的请求头属性 截图

禁止访问使用cookie检测

Cookieheader模块使用regex,取反检测存在cookieuser_id=,不存在禁止访问 截图

反向代理

匹配和标记模块都使用host,由80转到8080端口 截图

配置伪静态(tp框架,解决静态资源和隐藏index.php)

匹配host和标记模块都rewrite prefix:/ path:(.*) rewrite to:/index.php/$1 第二个标记模块都rewrite选择OR NEXT prefix:/ path:/static/ rewrite to:/ 截图

空文件

简介

暂无描述 展开 收起
C++ 等 6 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/jcleng/kangle.git
git@gitee.com:jcleng/kangle.git
jcleng
kangle
kangle
master

搜索帮助