Skip to content

Comments

add proxy support#10

Merged
ehsandeep merged 3 commits intodevfrom
proxy
Oct 24, 2022
Merged

add proxy support#10
ehsandeep merged 3 commits intodevfrom
proxy

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

@parrasajad parrasajad requested a review from Mzack9999 October 20, 2022 09:25
@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
@Mzack9999 Mzack9999 dismissed their stale review October 23, 2022 23:16

outdated

@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