Coder Social home page Coder Social logo

pipy-web-proxy's Introduction

1. pipy web-proxy

用于 HTTP、HTTPS 代理访问,支持 Basic 认证。
可以全局设置允许访问的域名,也可以针对具体的用户设置允许访问的域名。

2. 配置文件说明

2.1 acl.json

全局设置允许访问的域名

[
  {
    "allowDomainSuffix": [],
    "denyDomainSuffix": [
      ".xyz001.com"
    ],
    "servers": [
      "svc-1",
      "svc-2"
    ]
  }
]

allowDomainSuffix : 允许访问的域名 (白名单)
denyDomainSuffix: 禁止访问的域名 (黑名单)
servers: web-proxy 服务列表

2.2 consumer.json

用户配置

[
  {
    "name": "test",
    "password": "123456",
    "allowDomainSuffix": [
    ],
    "servers": [
      "svc-1",
      "svc-2"
    ]
  },
  {
    "name": "test2",
    "password": "12345678",
    "denyDomainSuffix": [
      ".baidu.com",
      ".google.com"
    ],
    "servers": [
      "svc-1"
    ]
  }
]

name: Basic 登录的用户名
password: Basic 登录的密码
allowDomainSuffix : 允许访问的域名 (白名单)
denyDomainSuffix: 禁止访问的域名 (黑名单)
servers: web-proxy 服务列表

2.3 config.json

{
  "configs": {
    "enableAclWithPort": false,
    "enableDebug": true
  },
  "servers": {
    "0.0.0.0:6060": {
      "enableProxyAuth": true,
      "serviceName": "svc-1"
    }
  },
  "policies": {
    "connectTimeout": "3s",
    "idleTimeout": "30s"
  },
  "accessLog": [
    {
      "url": "http://192.168.123.1:8123/?query=insert%20into%20log(message)%20format%20JSONAsString",
      "headers": {
        "Content-Type": "application/json",
        "Authorization": "Basic ZGVmYXVsdDoxMjM0NTY="
      },
      "batch": {
        "timeout": 1,
        "interval": 1,
        "size": 100,
        "prefix": "[",
        "postfix": "]",
        "separator": ","
      }
    }
  ]
}

enableProxyAuth: 是否开启 Basic 认证,开启后需要输入用户名、密码。
enableAclWithPort: 检查上游域名/IP是否允许访问时带上端口号。

pipy-web-proxy's People

Contributors

wanpf avatar zhangcheng870518 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.