Code Monkey home page Code Monkey logo

Comments (9)

pufferffish avatar pufferffish commented on August 11, 2024 5

Okay I think what I understand what you mean. So basically what you are asking for is a program that would expose itself as a wireguard peer, and any traffic it received would be forwarded via a specified socks5 server?

I think implementing such a thing wouldn't be hard. I can give it a try.

from wireproxy.

pufferffish avatar pufferffish commented on August 11, 2024 1

Hello,

Just to be sure, do you mean something like hosting a SOCKS5 server on wireguard's network, and the outbound traffic of the SOCKS5 proxy would be outside wireguard?

This would require some slight patching to or changing the socks5 library which I am currently using. In fact while testing suggestions in #15 I think I've accidentally implemented something like what you are describing. I'll look into it and try to implement it.

from wireproxy.

RoganDawes avatar RoganDawes commented on August 11, 2024 1

Tun2socks looks like it should do all I actually need, thanks for finding it! I'll test that out, and let you know how it goes.

from wireproxy.

RoganDawes avatar RoganDawes commented on August 11, 2024

Perhaps explaining the use case will clarify.

As a security person, quite often we can achieve a socks tunnel into a target network, whether via reGeorg or PivotNacci, or even ssh. Once that is done, sometimes we want to use a Windows-based tool to interact with eg the target domain, but actually coercing the tool to use the socks proxy can be quite difficult in some cases.

As an alternative, one could route the windows traffic over a vpn, such as wireguard, then use Linux transparent proxying and redsocks on the vpn endpoint to achieve the same end result. This has been prototyped using a docker container, but even then, it's more complicated and heavyweight than strictly necessary.

The proposed alternative would be to integrate the wireguard endpoint and the socks client into one app, such that any traffic reaching the wireguard endpoint, and destined for a non-local target would be routed via the socks client, to a specified socks server.

from wireproxy.

RoganDawes avatar RoganDawes commented on August 11, 2024

Yes, exactly that. Happy to test for you when needed.

from wireproxy.

pufferffish avatar pufferffish commented on August 11, 2024

So here is an status update: this is going to be harder than I had originally thought. gvisor's netstack is too abstracted for me to accomplish listening TCP traffic on all addresses easily. There is hope though: this library seems to allow me to implement your suggestion with ease.

From how things are looking right now, I will probably implement your suggestion in a separate project, since I doubt the final code will share anything with wireproxy's code (besides config parsing).

Edit: this project seems to mostly accomplish what you want, except the wireguard part. I will investigate into this project and see if I can adapt some of it into wireproxy.

from wireproxy.

vivek030 avatar vivek030 commented on August 11, 2024

Hi Rogan,
Kindly let us know if Tun2socks works and steps to follow.

Thanks

from wireproxy.

RoganDawes avatar RoganDawes commented on August 11, 2024

Did not end up trying it. HTTPS://GitHub.com/Sensepost/wiresocks did what I wanted it to do.

from wireproxy.

uuonda avatar uuonda commented on August 11, 2024

@pufferffish Does wireproxy support "reverse" SOCKS proxy and/or remote port forwarding?

For example a wireguard "client", peer 10.8.1.2, connects to the wireguard "server", peer 10.8.1.1. After that "server" can use 10.8.1.2:1080 as a SOCKS proxy to access whatever is reachable through 10.8.1.2.

from wireproxy.

Related Issues (20)

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.