how to use proxy:port for http request in automagic

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Kendbad
Posts: 20
Joined: 12 Mar 2020 12:02

how to use proxy:port for http request in automagic

Post by Kendbad » 19 Mar 2020 17:34

how to use proxy:port for http request in automagic.
I need to use proxy to send http request, but can't find it.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: how to use proxy:port for http request in automagic

Post by Desmanto » 19 Mar 2020 18:36

i also can't find a way to do it. The only possible one is to change wifi proxy, and seems only can be done via Control UI. So it is quite a distracting automation. Changing the proxy affect system wide connection. So if you don't need the proxy all the time, only for that particular http request, I only can think about using the flow :
- open setting and use control UI to change the proxy. Wait there
- Do http request at the background
- After finish, continue another Control UI to change the proxy back to none.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Kendbad
Posts: 20
Joined: 12 Mar 2020 12:02

Re: how to use proxy:port for http request in automagic

Post by Kendbad » 19 Mar 2020 20:38

I want to send multiple requests at the same time with many different proxies. The proxy is independent just like curl, Here is an example
https://techieroop.com/how-to-use-curl-with-proxy/

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: how to use proxy:port for http request in automagic

Post by Desmanto » 21 Mar 2020 17:42

Oh, I forgot we have curl. What is your android version? If you are on latest android, you should have curl binary already in the /system/bin.

You can use that directly as pointed out in your link. Use action execute command, then curl and use the proxy parameter.

But of course this is still a valid request, so we can use the proxy directly in HTTP request action.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Kendbad
Posts: 20
Joined: 12 Mar 2020 12:02

Re: how to use proxy:port for http request in automagic

Post by Kendbad » 24 Mar 2020 02:11

Desmanto wrote:
21 Mar 2020 17:42
Oh, I forgot we have curl. What is your android version? If you are on latest android, you should have curl binary already in the /system/bin.

You can use that directly as pointed out in your link. Use action execute command, then curl and use the proxy parameter.

But of course this is still a valid request, so we can use the proxy directly in HTTP request action.
I don't know how to use it, you can make me a simple flow ^^

Kendbad
Posts: 20
Joined: 12 Mar 2020 12:02

Re: how to use proxy:port for http request in automagic

Post by Kendbad » 24 Mar 2020 02:14

Desmanto wrote:
21 Mar 2020 17:42
Oh, I forgot we have curl. What is your android version? If you are on latest android, you should have curl binary already in the /system/bin.

You can use that directly as pointed out in your link. Use action execute command, then curl and use the proxy parameter.

But of course this is still a valid request, so we can use the proxy directly in HTTP request action.
I don't know how to use curl in automagic :(

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: how to use proxy:port for http request in automagic

Post by Desmanto » 25 Mar 2020 16:46

Just add action Execute Command. At the command field, put
curl -x yourproxyaddress:port sitetovisit

example

Code: Select all

curl -x www.proxy.com:8080 www.google.com
I don't have proxy to test. Can't find any test proxy to test on.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Kendbad
Posts: 20
Joined: 12 Mar 2020 12:02

Re: how to use proxy:port for http request in automagic

Post by Kendbad » 27 Mar 2020 16:49

Desmanto wrote:
25 Mar 2020 16:46
Just add action Execute Command. At the command field, put
curl -x yourproxyaddress:port sitetovisit

example

Code: Select all

curl -x www.proxy.com:8080 www.google.com
I don't have proxy to test. Can't find any test proxy to test on.
I have proxy
168.235.95.186:41360:ceJuGc:pdxksg
Please make a flow request http to facebook.com.
I cannot do it if I only see text :(
i didn't find full documentation on curl in automagic.
I could not find the download link for Curl for Linux - Android
Response
sh: curl: not found

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: how to use proxy:port for http request in automagic

Post by anuraag » 28 Mar 2020 00:59

What kind of proxy is that? 41360 is port but what are others?

Kendbad
Posts: 20
Joined: 12 Mar 2020 12:02

Re: how to use proxy:port for http request in automagic

Post by Kendbad » 28 Mar 2020 04:12

anuraag wrote:
28 Mar 2020 00:59
What kind of proxy is that? 41360 is port but what are others?
Ip:port:username:password

Locked