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

fix: adding info about url scheme missing #735

Merged
merged 4 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions docs/errors/details/_err_ngrok_9009.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Additional Information

If you are seeing an error such as: `ERROR: Invalid configuration property value for 'http_proxy': URL scheme must be 'http' or 'https'`, this means that you have a value set for the environment variable `http_proxy` or `http_proxy_env` and that it does not include the scheme in he value. If you are trying to use a proxy with ngrok, try updating the value of the env variable to include the proper scheme. If you are not trying to use ngrok with a proxy, then you will need to unset those env values before starting ngrok.
3 changes: 2 additions & 1 deletion docs/using-ngrok-with.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ Here you will find notes on using ngrok with particular technologies. Think we'r
| [MySQL](/using-ngrok-with/mysql) | Connect to local MySQL database with ngrok |
| [NGINX](/using-ngrok-with/nginx) | Learn how to configure ngrok when using it with NGINX |
| [Node (npm, node.js)](/using-ngrok-with/node-js) | Work with the ngrok agent from your Node application |
| [OpenVPN Connect](/using-ngrok-with/openvpn) | Use ngrok to connect to an OpenVPN server running behind CGNAT |
| [Outbound proxy](/using-ngrok-with/outboundProxy) | Use ngrok through an HTTP or SOCKS5 proxy |
| [PosgreSQL](/using-ngrok-with/postgresql) | Connect to a local PostgreSQL server using ngrok |
| [PostgreSQL](/using-ngrok-with/postgresql) | Connect to a local PostgreSQL server using ngrok |
| [Puppet](/using-ngrok-with/puppet) | Manage the ngrok Agent using Puppet |
| [Python](/using-ngrok-with/python) | Learn how to integrate with your Python application |
| [RDP](/using-ngrok-with/rdp) | Use ngrok with Windows Remote Desktop Protocol (RDP) |
Expand Down
15 changes: 15 additions & 0 deletions docs/using-ngrok-with/openvpn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: OpenVPN
---

# Using ngrok with OpenVPN Connect

A community user has created a detailed guide for configuring [Tunneling an OpenVPN server out from behind CGNAT](https://forums.openvpn.net/viewtopic.php?p=116476#p116476).

There are a lot more details in the linked post, but the summary of how to do it with ngrok is to open a TCP tunnel to port 443, and visit the resulting TCP address and port in your browser to download the `.ovpn` file needed by OpenVPN Connect.

```bash
ngrok tcp 443
```

From there, you will need to use a text editor to manually edit the downloaded `.opvn` file to change the port from 443 to the random TCP address port provided by ngrok. Then follow the standard steps to import the profile to your OpenVPN Connect software and you should be able to connect to your VPN as normal.
10 changes: 10 additions & 0 deletions docs/using-ngrok-with/wordpress.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,13 @@ This is using the the last hop in the `X-Forwarded-For` header to set `REMOTE_AD
If you are using a different header for the original client IP, or multiple forwarding proxies,
you will need to adjust this code accordingly.
:::

# Troubleshooting

If you are seeing an error about too many redirects (`TOO_MANY_REDIRECTS`), you may also need to add the following to your `wp-config` file as noted in [this issue](https://github.com/ngrok/ngrok/issues/3#issuecomment-2115490539):

```php
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
$_SERVER['HTTPS'] = 'on';
}
```
Loading