Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sprt/proxyctl
High-level library and program that allows users to program layer-4 proxy policies on Windows through the Host Networking Service (HNS).
https://github.com/sprt/proxyctl
hns networking windows
Last synced: 26 days ago
JSON representation
High-level library and program that allows users to program layer-4 proxy policies on Windows through the Host Networking Service (HNS).
- Host: GitHub
- URL: https://github.com/sprt/proxyctl
- Owner: sprt
- Created: 2019-08-26T19:10:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-11T03:45:53.000Z (over 5 years ago)
- Last Synced: 2024-10-20T06:09:20.184Z (2 months ago)
- Topics: hns, networking, windows
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# proxyctl [![](https://godoc.org/github.com/sprt/proxyctl?status.svg)](http://godoc.org/github.com/sprt/proxyctl)
proxyctl is a high-level library and program that allows users to program
layer-4 proxy policies on Windows through the Host Networking Service (HNS).## Example
The following code sets a proxy policy on the endpoint attached to a known Docker
container, such that:- Outbound TCP traffic will be redirected through port 8000
- Only if it originates from network compartment 2
- And unless it originates from the Local System SID, which is the proxy itself```go
dockerContainerID := "3a9b8667e69240afe64e77db0ee4b4056e69278c3d85a9add753eaca6601da93"
hnsEndpointID, _ := proxyctl.GetEndpointFromContainer(dockerContainerID)proxyPolicy := proxyctl.Policy{
Port: 8000,
UserSID: proxyctl.LocalSystemSID,
CompartmentID: 2,
}_ = proxyctl.AddPolicy(hnsEndpointID, proxyPolicy)
```## Current limitations
As of August 27, 2019, these are the limitations of proxyctl (subject to change):
- Only able to proxy outbound TCP traffic.
- Cannot filter specific ports.