git » gofer » next » tree

[next] / test / 01-fe.yaml

control_addr: "127.0.0.1:8440"

_routes: &routes
  "/dir/":
    proxy: "http://localhost:8450/dir/"
  "/authdir/":
    proxy: "http://localhost:8450/authdir/"
  "/file":
    proxy: "http://localhost:8450/file"
  "/cgi/":
    proxy: "http://localhost:8450/cgi/"
  "/cgiwithq/":
    proxy: "http://localhost:8450/cgi/?x=1&y=2"
  "/status/":
    proxy: "http://localhost:8450/status/"
  "/bad/unreachable":
    proxy: "http://localhost:1/"
  "/bad/empty":
    proxy: "http:"
  "/dar/":
    proxy: "http://localhost:8450/dir/"
  "/gogo/":
    redirect: "https://google.com"
  "/rlme/":
    proxy: "http://localhost:8450/cgi/"
  "/rere/":
    redirect_re:
      - from: "/rere/a/(..)/x"
        to: "/dst/a/$1/z"
      - from: "/rere/(.*)/zzz/(.*)"
        to: "http://example.com/dst/z/$2/z/$1"
        status: 308

reqlog:
  "requests":
    file: ".01-fe.requests.log"

ratelimit:
  "rl":
    rate: 1/1s
    rate64: 1/1s
    rate56: 1/500ms
    rate48: 1/250ms
  "raw-rl":
    rate: 1/1s

http:
  ":8441":
    routes: *routes
    reqlog:
      "/": "requests"
    ratelimit:
      "/rlme/": "rl"

https:
  ":8442":
    certs: ".certs"
    routes: *routes
    reqlog:
      "/": "requests"
    insecure_key_log_file: ".01-fe.8442.tls-secrets.txt"

  ":8443":
    autocerts:
      hosts: ["miau.com"]
      acmeurl: "http://localhost:8460/directory"
      cachedir: ".autocerts-cache"
    routes: *routes
    reqlog:
      "/": "requests"
    insecure_key_log_file: ".01-fe.8443.tls-secrets.txt"


# Raw proxy to the same backend.
raw:
  ":8445":
    to: "localhost:8450"
    reqlog: "requests"

  ":8446":
    to: "localhost:8450"
    certs: ".certs"
    reqlog: "requests"

  ":8447":
    to: "localhost:0"
    reqlog: "requests"

  # Raw proxy to ourselves over https, to test having a TLS backend.
  ":8448":
    to: "localhost:8442"
    to_tls: true
    reqlog: "requests"

  ":8449":
    to: "localhost:8450"
    reqlog: "requests"
    ratelimit: "raw-rl"