Giter VIP home page Giter VIP logo

nginx-wg-proxy's Introduction

nginx-wg-proxy

Docker Version Docker Pulls

This code has been almost fully generated by Chat GPT (conversation here).

Description

Small docker container which allows proxying http requests through a wireguard tunnel. Useful to expose your home computer local app with a public endpoint.

Usage

The container needs to run with NET_ADMIN capability enabled, it doesn't need to run with host networking.

  1. Once the container is running check logs to copy the wireguard configuration to your peer. Copy the contents of:
*** Wireguard config for peer ***
<contents>
*********      End      *********
  1. Paste it in a file named wg0.conf
  2. Run sudo wg-quick up ./wg0.conf in the file location
  3. You may need to allow connections to your nginxProxyPort in the firewall.

Flags:

You need to set IP and port for wgEndpoint or WgPeerEndpoint.

You also need to specify values for the flags which don't have defaults.

  -nginxIP string
        IP address for the nginx to listen on (default "0.0.0.0")
  -nginxPort string
        Port for the nginx to listen on (default "8080")
  -nginxProxyPort string
        Port for the nginx to proxy to (default "8080")
  -nginxServerName string
        Server name for the nginx server (default "wg-proxy")
  -wgEndpointIP string
        Peer endpoint IP used by the peer for the Wireguard tunnel
  -wgEndpointPort string
        Peer endpoint port used by the peer for the Wireguard tunnel (default "52122")
  -wgIP string
        IP address for the Wireguard interface (default "10.0.0.1")
  -wgPeerAllowedIPs string
        Allowed IPs for the peer for the Wireguard tunnel (default "10.0.0.2/32")
  -wgPeerEndpointIP string
        Peer endpoint IP used by the host for the Wireguard tunnel
  -wgPeerEndpointPort string
        Peer endpoint port used by the host for the Wireguard tunnel (default "52122")
  -wgPeerPublicKey string
        Public key of the peer for the Wireguard tunnel
  -wgPeerWireguardPort string
        Port for the Wireguard interface of the peer (default "52122")
  -wgPort string
        Port for the Wireguard interface (default "52122")
  -wgPrivateKey string
        Private key for the Wireguard interface

nginx-wg-proxy's People

Contributors

guillembonet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.