-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added forward proxy support and included an example
- Loading branch information
1 parent
ba71a9a
commit 5537d6e
Showing
3 changed files
with
69 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "http-forward-proxy-example", | ||
"description": "Sets up a simple forward proxy.", | ||
"dependencies": { | ||
"vibe-d:http": {"path": "../../"} | ||
}, | ||
"versions": ["VibeDefaultMain"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import vibe.appmain; | ||
import vibe.http.proxy; | ||
import vibe.http.server; | ||
|
||
|
||
shared static this() | ||
{ | ||
auto settings = new HTTPServerSettings; | ||
settings.port = 8080; | ||
settings.bindAddresses = ["::1", "127.0.0.1"]; | ||
|
||
listenHTTPForwardProxy(settings); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters