4 Star 16 Fork 11

code4j / jproxy

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

jproxy

jproxy introduction

jproxy http proxy made by java built by netty v4.0, you can visit real server's address via jproxy's address,just like squid,zproxy ect...


###jproxy's directory structure jproxy's directory just like tomcat's or jmeter's

  • bin: to launch jproxy by startup shell, you can also use startup /etc/jproxy/config.json to run this application by custom configuration file(it must be named as config.json)
  • lib: this directory include the jar's dependented by jproxy, you ***should not ***move
  • conf: the place where jproxy's default configuration files lay
  • docs: documents about jproxy (sorry but I haven't finished it yet — — | ) ##jproxy's core function

memory cache

jproxy use memory to store http's post and get data(especially json, form multipart data ect...). jproxy's cache module depend on redis.it can also save static resources such as html, css,js,and other image file. but now I shutdown the static resource storage because it has some bug on resolve resource's contentType. mayme someday I could figure it out... ####load balance

  • poll jproxy will call the host that you set up into config.json one by one and again,you can set the filed proxy_pass like this:
  "proxy_pass":[
    {
      "host":"localhost",
      "port":8080,
      "weight":1
    },
    {
      "host":"localhost",
      "port":8080,
      "weight":1
    }
  ]

you can ignore filed weight first because it related to another mode Filed host means real server's host (domain or ip). Filed port is the real server's entrance that your client want to visit via jproxy. Now,let's introduce the filed weight!!

  • weight poll As you see, this is also a poll mode,but this will not visit real server one by one. jproxy will fetch a real server's host from a container through server's weight's value that you set up.
  • source ip hash I haven't test this mode yet but that'll be allright in theory. First jproxy fetch client's ip, next use hash to comput a number, then mode the real server's number, finally we get a number in real server's number, so we can locate this client's ip hash to a certain real server.

空文件

简介

a proxy middleware writen by netty 展开 收起
Java 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/rpgmakervx/jproxy.git
git@gitee.com:rpgmakervx/jproxy.git
rpgmakervx
jproxy
jproxy
master

搜索帮助