An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/elazarl/goproxy

Taken from $GOROOT/src/pkg/net/http/chunked needed to write https responses to client. Package goproxy provides a customizable HTTP proxy, supporting hijacking HTTPS connection. The intent of the proxy, is to be usable with reasonable amount of traffic yet, customizable and programmable. The proxy itself is simply an `net/http` handler. Typical usage is Adding a header to each request For printing the content type of all incoming responses note that we used the ProxyCtx context variable here. It contains the request and the response (Req and Resp, Resp is nil if unavailable) of this specific client interaction with the proxy. To print the content type of all responses from a certain url, we'll add a ReqCondition to the OnResponse function: We can write the condition ourselves, conditions can be set on request and on response Caution! If you give a RespCondition to the OnRequest function, you'll get a run time panic! It doesn't make sense to read the response, if you still haven't got it! Finally, we have convenience function to throw a quick response we close the body of the original response, and return a new 403 response with a short message. Example use cases: 1. https://github.com/elazarl/goproxy/tree/master/examples/goproxy-avgsize To measure the average size of an Html served in your site. One can ask all the QA team to access the website by a proxy, and the proxy will measure the average size of all text/html responses from your host. 2. [not yet implemented] All requests to your web servers should be directed through the proxy, when the proxy will detect html pieces sent as a response to AJAX request, it'll send a warning email. 3. https://github.com/elazarl/goproxy/blob/master/examples/goproxy-httpdump/ Generate a real traffic to your website by real users using through proxy. Record the traffic, and try it again for more real load testing. 4. https://github.com/elazarl/goproxy/tree/master/examples/goproxy-no-reddit-at-worktime Will allow browsing to reddit.com between 8:00am and 17:00pm 5. https://github.com/elazarl/goproxy/tree/master/examples/goproxy-jquery-version Will warn if multiple versions of jquery are used in the same domain. 6. https://github.com/elazarl/goproxy/blob/master/examples/goproxy-upside-down-ternet/ Modifies image files in an HTTP response via goproxy's image extension found in ext/.
27 versions
Latest release: over 1 year ago
6,871 dependent packages

View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/elazarl/goproxy

Dependent Repos 6

1024pix/steampipe-plugin-learningcontent
Steampipe plugin to query LCMS content

Size: 101 KB - Last synced: 3 days ago - Pushed: over 1 year ago

1024pix/steampipe-plugin-metabase
Use SQL to query databases, tables, permissions and more from Metabase

Size: 1.22 MB - Last synced: 3 days ago - Pushed: 4 days ago

swh/infra/ci-cd/3rdparty/cert-manager-webhook-gandi

Last synced: 7 months ago - Pushed: 11 months ago

betagouv/sealed-secrets Fork of bitnami-labs/sealed-secrets
A Kubernetes controller and tool for one-way encrypted Secrets

Size: 19.2 MB - Last synced: 7 days ago - Pushed: almost 3 years ago

radiofrance/helm-chart-sonarqube Fork of SonarSource/helm-chart-sonarqube

Size: 2.99 MB - Last synced: 7 months ago - Pushed: 9 months ago

csan/csan
CSAN : A marketplace for science

Last synced: 7 months ago

SocialGouv/rollout-status Fork of clusterise/rollout-status
Alternative to kubectl rollout status

Size: 3.95 MB - Last synced: 6 days ago - Pushed: 2 months ago

InseeFrLab/onyxia-cli
WIP

Size: 53.7 KB - Last synced: 7 days ago - Pushed: 11 days ago

COSAE-FR/riproxy
Proxy utility fo RIP

Size: 84 KB - Last synced: 14 days ago - Pushed: 2 months ago

CEREMA/k3s-snapshots

Size: 6.12 MB - Last synced: 1 day ago - Pushed: almost 3 years ago

CEREMA/k3-utils

Size: 6.15 MB - Last synced: 1 day ago - Pushed: almost 3 years ago