Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add proxy support #10

Merged
merged 3 commits into from
Oct 24, 2022
Merged

add proxy support #10

merged 3 commits into from
Oct 24, 2022

Conversation

parrasajad
Copy link
Contributor

Examples

socks5:

$ echo AS54115 | asnmap --proxy socks5://127.0.0.1:40932

http:

$ echo AS54115 | asnmap --proxy http://127.0.0.1:8080

input file support:

$ echo AS54115 | asnmap --proxy proxtlist.txt

Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please try to refactor the SetProxy method by reducing complexity and increase code readability, for example:

  • Move URL checking and setproxy for each item into a proper routine
  • Move the file process utility into a subroutine
  • Reduce if nesting by preferring err != nil checks and early return

libs/client.go Outdated Show resolved Hide resolved
libs/client.go Outdated Show resolved Hide resolved
libs/client.go Outdated Show resolved Hide resolved
@parrasajad parrasajad linked an issue Oct 20, 2022 that may be closed by this pull request
@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Oct 23, 2022
@ehsandeep ehsandeep merged commit ef651a8 into dev Oct 24, 2022
@ehsandeep ehsandeep deleted the proxy branch October 24, 2022 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE: add proxy support
3 participants