Git Product home page Git Product logo

pingtunnel's People

Contributors

sanecz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pingtunnel's Issues

Incompatible with Python3

This part of code, basicly the struct parts and not functioning correctly, if you help me with that i will share with you also a private project of mine, i mannged to use your code to make reverse Socks5 proxy server using ICMP.

BUT i need to work in python3 since my code is in python3, im not able to figure out the logic of what you did there i port it my self, please help :)

Thanks in advance

    def create(self):
        pack_str = "!BBHHH4sH"
        pack_args = [self.type, self.code, 0, self.id, self.sequence,
                     socket.inet_aton(self.dest[0]), self.dest[1]]

        if self.length:
            pack_str += "{}s".format(self.length)
            pack_args.append(self.data)

        self.checksum = self._checksum(struct.pack(pack_str, *pack_args)) 
        pack_args[2] = self.checksum
        return struct.pack(pack_str, *pack_args)

Design stuff

From the README.md, it looks like you want to rework the thread & socket management. The Python community seems to have shifted to the asynchronous IO paradigm. It could probably give cleaner code & better performance.
For a small project build from scratch that doesn't need to leverage other libraries I would recommend curio (much easier to grasp and has less pitfalls than asyncio or there is trio which I never used but is inspired by curio's design principles).
I'll let you look at the examples to see how much the a client/server implementation may be cleaner.

Also, it seems you require root permissions so why don't you bring up a real tunnel and handle more than TCP by creating TUN or TAP devices (by opening /dev/net/tun on Linux)? It's easy to do with Python, if a bit obscur (since you'll have to define a couple of things yourself instead of relying on header files). The downside being you'll probably need to assign IP addresses on both sides.

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.