Pooling Demo

Endpoints

My endpoint ID is ep_2tZFwUyh5j2IRyBcVlQRLtaK6Uz

Endpoints at URL https://pool.n.billiards.party:

  1. ep_2tZFwgfWKYPg6rZojSGY6v8X2iy
  2. ep_2tZFwV4CVgiM4GvpQdeXJuPSQbB
  3. ep_2tZFwUyh5j2IRyBcVlQRLtaK6Uz
  4. ep_2tZFwP8lM47Z8wEgV4LylzM1JLj
  5. ep_2tZFuHoXoPafuO3fOFLYyImrOjl
View This Endpoint's Traffic Policy
on_http_request:
- actions:
  - type: http-request
    config:
      # {{range .Endpoints}}{{if (eq .URL "${endpoint.url}")}}<li>{{if (eq .ID "${endpoint.id}")}}<b>{{.ID}}</b>{{else}}{{.ID}}{{end}}</li>{{end}}{{end}}
      url: 'https://k.ek.gs/ngrok/endpoint?template=%7B%7Brange%20.Endpoints%7D%7D%7B%7Bif%20(eq%20.URL%20%22${endpoint.url}%22)%7D%7D%3Cli%3E%7B%7Bif%20(eq%20.ID%20%22${endpoint.id}%22)%7D%7D%3Cb%3E%7B%7B.ID%7D%7D%3C%2Fb%3E%7B%7Belse%7D%7D%7B%7B.ID%7D%7D%7B%7Bend%7D%7D%3C%2Fli%3E%7B%7Bend%7D%7D%7B%7Bend%7D%7D'
      headers:
        Authorization: "Bearer [secret]"
        Ngrok-Version: "2"
  - type: set-vars
    config:
      vars:
      - endpoint_list: "${actions.ngrok.http_request.res.body}"
  - type: http-request
    config:
      # {{range .Endpoints}}{{if (eq .ID "${endpoint.id}")}}{{$.TrafficPolicy | html}}{{end}}{{end}}
      url: 'https://k.ek.gs/ngrok/endpoint?template=%7B%7Brange%20.Endpoints%7D%7D%7B%7Bif%20(eq%20.ID%20%22${endpoint.id}%22)%7D%7D%7B%7B.TrafficPolicy%20%7C%20html%7D%7D%7B%7Bend%7D%7D%7B%7Bend%7D%7D'
      headers:
        Authorization: "Bearer [secret]"
        Ngrok-Version: "2"
  - type: custom-response
    config:
      status_code: 200
      headers:
        Content-Type: "text/html"
      content: |-
        <!DOCTYPE html>
        <html lang="en">
        <head>
            <meta charset="UTF-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>Pooling Demo</title>
            <style>
                body {
                    background-color: #0a0f24;
                    color: #ffffff;
                    font-family: Arial, sans-serif;
                    margin: 0;
                    padding: 20px;
                }
                h1 {
                    color: #a971ff;
                }
                h3 {
                    color: #67c1f5;
                }
                .container {
                    margin: 0 auto;
                    background: #12172e;
                    padding: 20px;
                    border-radius: 8px;
                    list-style-position: inside;
                }
                ol, .endpoint {
                    font-family: monospace;
                    background: #1e2a47;
                    padding: 10px;
                    border-radius: 4px;
                    margin: 5px 0;
                }
                summary {
                    font-style: italic;
                    color: #b0b0b0;
                }
                .link {
                    color: #67c1f5;
                    text-decoration: none;
                    font-weight: bold;
                }
                .link:hover {
                    text-decoration: underline;
                }
            </style>
        </head>
        <body>
            <div class="container">
                <h1>Pooling Demo</h1>
                <h3>Endpoints</h3>
                <p>My endpoint ID is <span class="endpoint">${endpoint.id}</span></p>
                <p>Endpoints at URL <a href="${endpoint.url}" class="link">${endpoint.url}</a>:</p>
                <ol>
                ${vars.endpoint_list}
                </ol>

                <Details>

                <summary>View This Endpoint's Traffic Policy</summary>

                <pre>${actions.ngrok.http_request.res.body.replace('[secret]', '[secret]')}</pre>
                </Details>
            </div>
        </body>
        </html>