trudy | transparent proxy that can modify and drop traffic | Proxy library

 by   praetorian-inc Go Version: Current License: GPL-2.0

kandi X-RAY | trudy Summary

kandi X-RAY | trudy Summary

trudy is a Go library typically used in Networking, Proxy applications. trudy has no bugs, it has no vulnerabilities, it has a Strong Copyleft License and it has low support. You can download it from GitHub.

Trudy is a transparent proxy that can modify and drop traffic for arbitrary TCP connections. Trudy can be used to programmatically modify TCP traffic for proxy-unaware clients. Trudy creates a 2-way "pipe" for each connection it proxies. The device you are proxying (the "client") connects to Trudy (but doesn't know this) and Trudy connects to the client's intended destination (the "server"). Traffic is then passed between these pipes. Users can create Go functions to mangle data between pipes. See it in action! For a practical overview, check out @tsusanka's very good blog post on using Trudy to analyze Telegram's MTProto. Trudy can also proxy TLS connections. Obviously, you will need a valid certificate or a client that does not validate certificates. Trudy was designed for monitoring and modifying proxy-unaware devices that use non-HTTP protocols. If you want to monitor, intercept, and modify HTTP traffic, Burp Suite is probably the better option.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              trudy has a low active ecosystem.
              It has 234 star(s) with 47 fork(s). There are 20 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 11 open issues and 6 have been closed. On average issues are closed in 26 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of trudy is current.

            kandi-Quality Quality

              trudy has 0 bugs and 0 code smells.

            kandi-Security Security

              trudy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              trudy code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              trudy is licensed under the GPL-2.0 License. This license is Strong Copyleft.
              Strong Copyleft licenses enforce sharing, and you can use them when creating open source projects.

            kandi-Reuse Reuse

              trudy releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 617 lines of code, 44 functions and 4 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of trudy
            Get all kandi verified functions for this library.

            trudy Key Features

            No Key Features are available at this moment for trudy.

            trudy Examples and Code Snippets

            No Code Snippets are available at this moment for trudy.

            Community Discussions

            QUESTION

            How to append values to an ordered list of tuples based on a pattern?
            Asked 2021-Dec-09 at 15:59

            I have a bit of a complicated iteration and joining problem, please allow me to provide context. I have two lists:

            List #1 contains a list of users:

            users = ['Alice', 'Bob, 'Gary', 'Trudy', 'Charles', 'Edith', ...]

            List #2 are tuples representing an arbitrary ID and a Family Member:

            relations = [('0', 'Sister'), ('1', 'Brother'), ('0', 'Grandmother'), ('1', 'Grandfather'), ('2', 'Mother'), ('3', 'Father'), ('4', 'Brother'), ('0', 'Mother'), ('1', 'Father'), ('2', 'Brother'), (...)]

            The challenge is:

            • relations for a User start when the ID is 0 in List #2
            • and the end of their relations is marked when 0 is seen again

            How can I combine them into one list where each Relation ID and Family Member has the User attached?

            For example Alice would look like: ((Alice, ('0', 'Sister')), (Alice, ('1', 'Brother'))

            While Bob's relations start right after at '0', 'Grandmother' and end with '4', 'Brother'), and Gary's relations follow-on with '0', Mother. The user list and the relations list in this regard line up precisely.

            So far what I've come up with is constructing some kind of loop where I check if the relations[i][0] position is == '0' but I'm not sure how to stop appending Alice when 0 comes up again and have it continue at that point iterating for user Bob, then Gary, and so on.

            The unpredictability is that there is no maximum ID value or expected range, users have random numbers of relations.

            ...

            ANSWER

            Answered 2021-Dec-09 at 15:59

            seems like a better structure would be a dict, so you would have just one entry for each user:

            Source https://stackoverflow.com/questions/70292840

            QUESTION

            How to access existing dict key inside a for loop without creating a new key?
            Asked 2021-Mar-19 at 12:13

            I have a list of dictionaries like so

            ...

            ANSWER

            Answered 2021-Mar-19 at 12:13

            I found a solution to my problem. I did it like so

            Source https://stackoverflow.com/questions/66707089

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install trudy

            Configure a virtual machine (Trudy has been tested on a 64-bit Debian 8 VM) to shove all traffic through Trudy. I personally use a Vagrant VM that sets this up for me. The Vagrant VM is available here. If you would like to use different --to-ports values, you can use Trudy's command line flags to change Trudy's listening ports. Clone the repo on the virtual machine and build the Trudy binary. Run the Trudy binary as root. This starts the listeners. If you ran the iptables commands above, iptables will forward traffic destined for port 443 to port 6443. Trudy listens on this port and expects traffic coming into this port to be TLS. All other TCP connections will be forwarded through port 6666. Setup your host machine to use the virtual machine as its router. You should see connections being made in Trudy's console but not notice any traffic issues on the host machine (except TLS errors).
            Configure a virtual machine (Trudy has been tested on a 64-bit Debian 8 VM) to shove all traffic through Trudy. I personally use a Vagrant VM that sets this up for me. The Vagrant VM is available here. If you would like to use different --to-ports values, you can use Trudy's command line flags to change Trudy's listening ports. iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 8888 -m tcp -j REDIRECT --to-ports 8080 iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -m tcp -j REDIRECT --to-ports 6443 iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp -j REDIRECT --to-ports 6666 ip route del 0/0 route add default gw 192.168.1.1 dev eth1 sysctl -w net.ipv4.ip_forward=1
            Clone the repo on the virtual machine and build the Trudy binary. git clone https://github.com/kelbyludwig/trudy.git cd trudy go install
            Run the Trudy binary as root. This starts the listeners. If you ran the iptables commands above, iptables will forward traffic destined for port 443 to port 6443. Trudy listens on this port and expects traffic coming into this port to be TLS. All other TCP connections will be forwarded through port 6666. sudo $GOPATH/bin/trudy
            Setup your host machine to use the virtual machine as its router. You should see connections being made in Trudy's console but not notice any traffic issues on the host machine (except TLS errors).
            In order to manipulate data, just implement whatever functions you might need within the module package. The default implementations for these functions are hands-off, so if they do not make sense for your situation, feel free to leave them as they are. More detailed documentation is in the module package and the data flow is detailed below.
            To access the interceptor, visit http://<IP ADDRESS OF VM>:8888/ in your web browser. The only gotcha here is you must visit the interceptor after starting Trudy but before Trudy receives a packet that it wants to intercept.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/praetorian-inc/trudy.git

          • CLI

            gh repo clone praetorian-inc/trudy

          • sshUrl

            git@github.com:praetorian-inc/trudy.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Proxy Libraries

            frp

            by fatedier

            shadowsocks-windows

            by shadowsocks

            v2ray-core

            by v2ray

            caddy

            by caddyserver

            XX-Net

            by XX-net

            Try Top Libraries by praetorian-inc

            gokart

            by praetorian-incGo

            noseyparker

            by praetorian-incRust

            pentestly

            by praetorian-incPython

            DVRF

            by praetorian-incHTML

            purple-team-attack-automation

            by praetorian-incRuby