namecoin / heteronculous-horklump

Go port of Heteronculous (ptrace-based proxy leak detector). Outreachy project.
GNU General Public License v3.0
7 stars 3 forks source link

Codebase improvements #34

Closed robertmin1 closed 1 year ago

robertmin1 commented 1 year ago

Making codebase improvements by making an address struct to host the Ip as net.IP and port. This enables us to access the functions available on net.IP vars directly compared to storing it as a string. Changes to HandleConnect function: Using a switch instead of if/else statements The improvements required a bit more changes to cover when the address is a path e.g A Unix Socket Path. The GetIPAndPortdata returns a string in case a path is an address. The path addresses can be ignored and the syscall blocked for cleaner code.