You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-40Lines changed: 42 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# proxy power button
1
+
# proxy power button (ppb)
2
2
3
-
A secure reverse proxy that automatically powers on Google Compute Engine instances when traffic arrives.
3
+
A reverse proxy that automatically powers on Google Compute Engine instances when traffic arrives.
4
4
5
5
This service is designed to run on **Google Cloud Run as an ingress layer** in front of your full application stack running on Google Compute Engine. When traffic hits your Cloud Run endpoint, PPB automatically powers on the target GCE VM (if needed) and proxies the request through. This architecture allows you to run complete application stacks on cost-effective VMs while only paying for Cloud Run when traffic actually arrives.
6
6
@@ -19,7 +19,7 @@ Internet → Cloud Run (PPB) → Google Compute Engine (Full App Stack)
19
19
PPB runs as a reverse proxy with intelligent rate limiting:
20
20
21
21
1.**Request handling**: Each authorized request attempts to power on the target machine if needed
22
-
2.**Rate limiting**: Power-on attempts are rate limited with a configurable cooldown period (default 30s)
22
+
2.**Rate limiting**: Power-on attempts are rate limited with a configurable cooldown period (default 30s)
23
23
3.**API protection**: Prevents hammering Google Cloud APIs during high traffic periods
24
24
4.**IP Security**: Only requests from allowed IP ranges can trigger machine power-on attempts
25
25
@@ -42,61 +42,63 @@ type: google_compute_engine
42
42
port: 80
43
43
scheme: http
44
44
allowedIps:
45
-
- 127.0.0.1/32# localhost
46
-
- 10.0.0.0/8# private networks
45
+
- 127.0.0.1/32
46
+
- 10.0.0.0/8
47
47
- 172.16.0.0/12
48
48
- 192.168.0.0/16
49
49
ipForwardedHeader: X-Forwarded-For # header to check for real client IP
50
50
ipDepth: 0# depth in X-Forwarded-For chain
51
51
powerOnCooldown: 30# seconds between power-on attempts (default: 30)
52
+
# metadata about the machine that will be turned on
| `machineMetadata.usePrivateIp` | bool | ❌ | `false` | Use private IP for VPC-native setups |
88
-
89
-
Deploy this service on **Google Cloud Run** as the public endpoint for your application. Configure the `machineMetadata` to point to your GCE VM running the actual application stack. Only requests from allowed IPs will power on the VM and be proxied through.
71
+
| Field | Type | Required | Default | Description|
|`machineMetadata.usePrivateIp`| bool | ❌ |`false`| Use private IP for VPC-native setups|
90
+
91
+
Deploy this service on **Google Cloud Run** as the public endpoint for your application. Configure the `machineMetadata` to point to your GCE VM running the actual application stack. Only requests from allowed IPs will power on the VM and be proxied through. Set to `0.0.0.0/0` to allow any request to power on the machine.
90
92
91
93
### Environment Variables
92
94
93
95
PPB also supports these environment variables for runtime configuration:
PPB will act as a local ingress proxy to your GCE VM. Visit http://localhost:8080 and PPB will power on your target VM (if needed) then proxy your requests through to the application running on the VM.
@@ -170,7 +172,7 @@ Deploy PPB to Cloud Run and configure it as your application's public endpoint:
0 commit comments