Change ip:port of desired proxy based on the highlighted text

I need to find a new proxy once every week and I guess the same goes for many others. Trying new proxies from a list is a mighty cumbersome thing to do. I've written a AutoHotkey (great little program) script that does the job, but still, it could be much simpler if FoxyProxy had the feature.

What my script does is, you highlight any text with mouse and press the designated key. Highlighted text is copied to to clipboard, and the ip address and the port in the copied text are isolated in-script (the highlighted text could be anything, the script will look for #.#.#.# and :# formats in it, whether adjacent or separate). Manual Proxy Configuration field is "manually" opened through sending a series of keystrokes (ctrl+f2 to enter options; alt+p, tab, space, alt+e to open the first proxy settings, etc.), and the ip address and port are changed in the same way.

If a similar feature was built in FoxyProxy, it would be a time-saver.
Eg: Highlight text, right click, Foxy Proxy > Proxy name > Set new Host

edit: And all the better if there could even be a shortcut.

Hi, This is an excellent

Hi,

This is an excellent idea. I like it very much and will add it to a future release ASAP. This is a backlog of things to do, however, so please be patient. Don't be shy about "bumping" this topic later if you don't see the feature in the next couple months.

Eric

Great to hear that

I'm very glad that you liked the idea. I'll surely be looking forward to the next couple of updates.

If anyone else thinks and feels the same way, I could share my AutoHotkey script, either as plain script text or as a compiled .exe, until the feature makes it into FoxyProxy. Let me know.

Bump!

I'm looking for the same feature. An example use case would be: (1) Go to http://*******.com/ (2) Highlight a table entry (e.g., "212.200.208.225:8080") (3) Hit the [hypothetical] key shortcut, or right-click FoxyProxy and select the [hypothetical] menu item "Use this proxy for all URLs". (4) FoxyProxy [hypothetically] automatically fills in the name of the new proxy ("212.200.208.225:8080"), the URL ("212.200.208.225"), and the port number ("8080") and starts using it. Port number should default to 80 if it's not specified explicitly.

Coming soon as

Coming soon as possible.

Eric

No it wont!

wow, that looks great, will you release the code?

thanks in advance

Great to see that this

Great to see that this hasn't been forgotten :) Waiting anxiously.

Suggestion Revised

Highlight text, right click, Foxy Proxy > Proxy name > "Set new Host"
Highlight text, right click, Foxy Proxy > Proxy name > "Set new Host & Go"

Preferrably with hotkeys for both.

I know what "Set new host"

I know what "Set new host" means, but what does "Set new Host & Go" mean?

It would immediately reload

It would immediately reload the current page, or a specific url you entered somewhere in options, with the highlighted and newly set proxy. For testing purposes.

Hi denizsi, You wrote: "the

Hi denizsi,

You wrote: "the script will look for #.#.#.# and :# formats in it, whether adjacent or separate".

Can you please post that code so I don't have to rewrite the parsing of that? Hopefully you have it in a regular expression, but if not, that's ok.

Thank you,
Eric Jung
Author
FoxyProxy

Like your previous post, I

Like your previous post, I saw your new one just now, a month later. I'll remember to check back earlier the next time ;)

It was a lengthy script using AutoHotKey's own internal functions so I doubt it would do you any good, but I realized that it was pointless and slow to begin with, since the source text rarely had any deviations from the #.#.#.#:# format on most proxy listings and the length of the script only slowed down the execution of it because of all the functions used.

My final solution is even simpler and faster. I make just a little more effort by highlighting only the ip:port text if they are adjacent, and if not, I have two more functions within the same script where one function only copies and changes the ip in FoxyProxy menu, and the other, the port. For the first function, what my script basically does when on proxy details page of foxy proxy is:

sends a ctrl+v in IP field to paste the IP:port
sends a shift+ctrl+left to highlight the port
sends ctrl+x to cut the highlighted port
sends a backspace to delete the ":"
sends a tab to jump to the port field
sends a ctrl+v to paste the port

and a bunch of other keystrokes to hit OK and close the foxy proxy options, etc. I could look for the old script if you like but I might have deleted it. If it's vital, I think I could rewrite it without much difficulty even if I've deleted it, but wouldn't it be possible, and much simpler, to take a similar approach for foxy proxy as well?

The current script I use in case you or anyone would like to take a look at.
http://www.filefactory.com/file/agc0f2a/n/proxy_test_Slower_ahk

Thanks anyway, but I don't

Thanks anyway, but I don't need it. I wrote most of this (99%) for FoxyProxy 2.9, coming out today I hope. Unfortunately, I couldn't get that last 1% done on time... so it has to wait until the next release.

Eric

Grear to hear that. So, will

Grear to hear that. So, will FoxyProxy be interpreting ip and port from any highlighted text, or did you go with a simpler method like mine as well?

It interprets ip/host and

It interprets ip/host and port from any highlighted text. It has a few enhanced features like stripping extra whitespace and the "colon" doens't have to be the delimiter (it can be a space or tab or any whitespace). But otherwise, that's it.

Sounds awesome, can't wait.

Sounds awesome, can't wait.

Yeah, it's done, just have

Yeah, it's done, just have to release 2.9.1.

Implemented in FoxyProxy

Implemented in FoxyProxy 2.11. Use the Alt+F3 shortcut key, or the context-menu when you've selected something that looks like a host:port... you'll see a menu item "SEt xxx:xxxx as new host:port"
 
Eric

Beautiful! Glad to see it at

Beautiful! Glad to see it at last. However, wouldn't it be easier and more practical to set it as below in the context menu:
 
FoxyProxy >> set #.#.#.#:# as new host and port for >> [proxyname#1]
                                                                                       >> [proxyname#2]
 
And I've just noticed that it isn't that practical to immediately reload the current page :)
 
Pop up list seems more appropriate for when using the keyboard shortcut.
 
And one more shameless suggestion: a second keyboard shortcut to set the new host&port for proxy entry at the top of the proxy list in FoxyProxy menu (for speed purposes). Or maybe use Alt+F3 for this directly.

My final Suggestion on this

I've been using this feature since it got implemented, and I've come find that it only needs a single adjustment: When you press Alt + F3, the "reload current tab" option would really be more useful if it were "reload next tab". Or, just add two boxes for both ;)

Hi Denizsi, Thanks for the

Hi Denizsi,

Thanks for the feedback. What is the "next" tab, exactly?

Also, do you still feel the same way about your suggestions from July 12?

Thanks,
Eric

Next tab, I mean the if

Next tab, I mean the if there are at least two open tabs, FoxyProxy would reload the tab next to the currently viewed tab. Because, when you're changing proxy IP from a proxy list, reloading the same proxy listing page isn't that useful. It would be more functional if you had a page on the next tab which you can't (or don't want to) access without a proxy and have it in your template list so you could quickly test new proxies more efficiently. Right now, I change the proxy with the alt+f3 shortcut from a list, making sure reload is not selected. Then quickly press ctrl+pgup, ctrl+f5, ctrl+pgdn to reload the next tab see if the proxy works.
 
Now thinking back, some of the my other suggestions weren't good. It would only add to relative complexity of the FoxyProxy menus. The way you've done it with Alt+F3 works just great, other than what I've suggested above.
 
There seems to be a bug, though, or maybe it isn't, I'm not sure. Even though I uncheck the "reload tab" box on the proxy shortcut menu, it still defaults to checked state after a while.