Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document some known gotchas in both ruby and python apps #73

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Deploying this egress proxy in front of your cloud.gov application will help you
System(https_proxy, "web egress proxy", "proxy for HTTP/S connections")
}
}

Boundary(external_boundary, "external boundary") {
System(external_service, "external service", "service that the application relies on")
}
Expand Down Expand Up @@ -178,6 +178,10 @@ $ cf ssh myapp -t -c "/tmp/lifecycle/launcher /home/vcap/app /bin/bash"

If that _doesn't_ look OK: You may be using the proxy in a new or unexpected way, or you may have found a bug. Please file an issue or otherwise contact the project's maintainers!

### Language references

Gotchas found in each application language can be found within the [docs](./docs) folder.

## How it works

- The proxy runs [Caddy V2](https://caddyserver.com)
Expand Down
8 changes: 8 additions & 0 deletions docs/python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Using cg-egress-proxy with a Python application

## SSL Certificate errors

It has been found that several Environment variables need to be set for various networking libraries to load the SSL certificate used to protect the TLS connection between the application and the proxy. The following variables have been used:
rahearn marked this conversation as resolved.
Show resolved Hide resolved

* `REQUESTS_CA_BUNDLE` for the [requests](https://pypi.org/project/requests/) python library.
* `NEW_RELIC_CA_BUNDLE_PATH` for the [New Relic](https://pypi.org/project/newrelic/) SDK.
11 changes: 11 additions & 0 deletions docs/ruby.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Using cg-egress-proxy with a Ruby application

By default,[^1] `net/http` proxy support is limited to connecting to `http` proxies, and not `https` proxies. To make proxied connections in Ruby, use [Faraday](https://rubygems.org/gems/faraday) along with one of the following two adapters[^2]:

* [faraday-typhoeus](https://rubygems.org/gems/faraday-typhoeus)
* [faraday-patron](https://rubygems.org/gems/faraday-patron)

Both of those adapters should work out-of-the-box to configure themselves properly from the `http_proxy` and `https_proxy` environment variables and system certificate store.

[^1]: As of September 30, 2024
[^2]: Please update this list if you find more adapters that work. This is not exhaustive.
Loading