Git Product home page Git Product logo

Comments (11)

doomedraven avatar doomedraven commented on July 17, 2024 4

the @gmacon PR works just fine for latest mac :) would be nice to have it merged, thanks for great work to both of you

from vpn-slice.

gmacon avatar gmacon commented on July 17, 2024 3

I'm not crazy about all the formatting changes ...

I'll fix that. (The answer to "Why?" is "Because I have my editor configure to do that automatically.")

What's preventing you from being able to test it?

Nothing. I just haven't done it yet.

from vpn-slice.

pmgmendes avatar pmgmendes commented on July 17, 2024 1

This would be great.
https://github.com/brona/iproute2mac appears to provide a similar interface to iproutes but major changes would need to happen to replace iptables role properly.

from vpn-slice.

gmacon avatar gmacon commented on July 17, 2024 1

I took a look at this, and I think the first step here is to change the level of the abstraction used by the os-specific layer. That is, I think there should be functions like add_route, remove_route, and so on and let the underlying command line tools be an implementation detail.

from vpn-slice.

gmacon avatar gmacon commented on July 17, 2024 1

I've now got a branch where I factored out the Linux version. I think I got a little carried away... In any case, if there are comments on the design, I'd like to hear them sooner rather than later. Note that I haven't run this code yet, so no guarantees that it works.

from vpn-slice.

doomedraven avatar doomedraven commented on July 17, 2024 1

@dlenski you can close this one now

from vpn-slice.

dlenski avatar dlenski commented on July 17, 2024

If you want to add MacOS support and submit a pull request, I'd be happy to review that. But it's not something I will work on.

I don't use MacOS or want to use MacOS. The MacOS kernel is not nearly as versatile as Linux in terms of networking capabilities, and MacOS is especially deficient in its command line routing utilities compared to Linux, in part because Apple refuses to include GPLv3 software in MacOS.

from vpn-slice.

dlenski avatar dlenski commented on July 17, 2024

@pmgmendes, do you want to take a crack at it?

vpn-slice uses iptables only for one very minor thing (blocking incoming traffic). Everything else is iproute2. It could be rewritten for BSD-style route, or using that iproute2 wrapper for MacOS.

I could provide advice on anything not directly related to MacOS that you might get stuck on.

from vpn-slice.

dlenski avatar dlenski commented on July 17, 2024

@gmacon, I agree.

Have a mock/test harness to verify and modify the routing would probably make it much easier to move to such an abstraction layer, and isolate the OS-specific parts.

from vpn-slice.

dlenski avatar dlenski commented on July 17, 2024

I think I got a little carried away... In any case, if there are comments on the design, I'd like to hear them sooner rather than later.

It seems pretty reasonable to me.

I'm not crazy about all the formatting changes where you replace ' with " (why? what does this do other than clutter the diffs?) and where you take…

function_calls("like", "this", with_lots_of_arguments=True, that_probably_are_longer_than_they_should_be=True)

… and change it to:

function_calls(
    "like",
    "this",
    with_lots_of_arguments=True,
    that_probably_are_longer_than_they_should_be=True
)

… since I tend to find higher code density more readable in most of these cases. But other than that it looks good.

Note that I haven't run this code yet, so no guarantees that it works.

I gave it a shot with a couple different VPNs, and it seems to work as expected. What's preventing you from being able to test it?

from vpn-slice.

dlenski avatar dlenski commented on July 17, 2024

🍻

from vpn-slice.

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.