• Stars
    star
    119
  • Rank 297,930 (Top 6 %)
  • Language
    Dockerfile
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Expose a WireGuard tunnel as a SOCKS5 proxy

docker-wireguard-socks-proxy

Expose WireGuard as a SOCKS5 proxy in a Docker container.

(For the same thing in OpenVPN, see kizzx2/docker-openvpn-client-socks)

Why?

This is arguably the easiest way to achieve "app based" routing. For example, you may only want certain applications to go through your WireGuard tunnel while the rest of your system should go through the default gateway. You can also achieve "domain name based" routing by using a PAC file that most browsers support.

Usage

Preferably, using start in this repository:

bash start.sh /directory/containing/your/wireguard/conf/file

Alternatively, you can use docker run directly if you want to customize things such as port mapping:

docker run -it --rm --cap-add=NET_ADMIN \
    --name wireguard-socks-proxy \
    --volume /directory/containing/your/wireguard/conf/file/:/etc/wireguard/:ro \
    -p 1080:1080 \
    kizzx2/wireguard-socks-proxy

Then connect to SOCKS proxy through through 127.0.0.1:1080 (or local.docker:1080 for Mac / docker-machine / etc.). For example:

curl --proxy socks5h://127.0.0.1:1080 ipinfo.io

HTTP Proxy

You can easily convert this to an HTTP proxy using http-proxy-to-socks, e.g.

hpts -s 127.0.0.1:1080 -p 8080

Troubleshooting

I get "Permission Denied"

This can happen if your WireGuard configuration file includes an IPv6 address but your host interface does not work with it. Try removing the IPv6 address in Address from your configuration file.

More Repositories

1

wireshark-http-gunzip

Make Wireshark's "Follow TCP Stream" support Content-Encoding: gzip
Ruby
29
star
2

fnft

A wallet protocol and implementation to allow transferable Fractional Ownership to be implemented for ERC721 tokens (NFTs).
JavaScript
24
star
3

cmd-recycle

Delete files to Recycle Bin from Windows command line
C#
18
star
4

EyeDisposable

IL instrumenter to help detect "IDisposable leaks" in .NET programs
C#
17
star
5

haskell-qrcode

QR Code encoder (future) decoder in pure Haskell
Haskell
15
star
6

illustrated-haskell

Haskell through succinct, narrative, worked examples
Haskell
12
star
7

pwdhash.rb

Generates PwdHash passwords from the command line.
Ruby
11
star
8

sbe-python

Easy-to-use Python SBE decoder and encoder
Python
9
star
9

ccxt-rs-lib

Rust version of ccxt
Rust
9
star
10

bitbar-countdown-timer

Countdown timer plugin for the BitBar app
Ruby
7
star
11

solana-sign-with-payment

Prove ownership of a Solana address by asking the user to send a small amount
TypeScript
6
star
12

easyfix

Easy to use, low-boilerplate FIX wrapper for QuickFIX with humanized outputs
Python
5
star
13

watch_point

Lightweight watchpoint implementation for debugging
Ruby
4
star
14

mix-release-docker

Minimal shell script to build a minimal Elixir/Phoenix app docker image
Shell
4
star
15

irrlicht-ogl-es

Fixes rough edges of the Irrlicht ogl-es branch
C++
4
star
16

erlang-chatty

Small, quick chat server in Erlang
Erlang
3
star
17

antlr-cminus

Real world organic ANTLR example of a C-like language
Java
3
star
18

chainlink-sol-playground

Vue
2
star
19

idonethat

iDoneThis clone / Heroku ready / Ruby on Rails
Ruby
2
star
20

impl_me

Automatically generate function definitions for C++ classes for lazy people.
Ruby
2
star
21

docker-neo-cli

Docker image to run neo-cli in one line
2
star
22

mongolab

Example source code for the blog post "Slow batch insert with MongoDB sharding"
Shell
2
star
23

FusionMemoryManager

Helper library to make exposing C interface of an C++ library fun and easy
C++
1
star
24

imhexdisplay

Display pixel images right from your debugger!
C++
1
star
25

ita-amazement

Solving ITA's "ASCII A-maze-ment" problem using OCaml, featuring its module system.
OCaml
1
star
26

dotfiles

JavaScript
1
star