Force use of WiFi interface for HTTP Request
Moderator: Martin
Force use of WiFi interface for HTTP Request
Context of request:
http://automagic4android.com/forum/view ... 453#p21453
Is forcing use of a specific interface possible as an action option?
http://automagic4android.com/forum/view ... 453#p21453
Is forcing use of a specific interface possible as an action option?
Re: Force use of WiFi interface for HTTP Request
I'm not yet sure if this is possible for action HTTP Request. It seems that it would be possible to temporarily force Automagic to use the WiFi interface for all network requests on Android 6+ but not for a single HTTP Request so it could have side effects when other actions would try to access the internet at the same time the HTTP Request is executed.
I'll investigate if there's a better way that does not globally affect all network requests by Automagic.
Regards,
Martin
I'll investigate if there's a better way that does not globally affect all network requests by Automagic.
Regards,
Martin
Re: Force use of WiFi interface for HTTP Request
Even a separate action to enable/disable all network requests to use the WiFi interface would be a lot better than trying to rely on Control UI to toggle the network data setting
Re: Force use of WiFi interface for HTTP Request
I could provide a new action to force the use of a particular network interface for network access in Automagic. I've never used this API of Android before so I have no experience if it actually works but let me try to add the action so we can test it.
Regards,
Martin
Regards,
Martin
-
- Posts: 2
- Joined: 19 Jun 2018 11:44
Re: Force use of WiFi interface for HTTP Request
HTTP is a text-based protocol, in detail to be more correct it is an ASCII based protocol. This means that all the communication is attractive much readable, no decoding, no translation or decryption. Look at an HTTP trace and you'll be attractive much able to read it, separate out all the GET requests and responses and it's not that solid to follow also. Of course, this is slightly upsetting in this world where we are told to encrypt and secure our identities, the method of transport which delivers most personal information operates almost totally in clear text.
Thanks & Regards,
Jordan Caver
Web Development Toronto
Web Development Company
Thanks & Regards,
Jordan Caver
Web Development Toronto
Web Development Company
Re: Force use of WiFi interface for HTTP Request
Correct, and this is bit off topic, but in my case it's non-personal data that's being sent by Automagic that's being used to control a relay and it's being sent over an encrypted WiFi connection to the end device (internet not involved)jordancaver123 wrote:HTTP is a text-based protocol, in detail to be more correct it is an ASCII based protocol. This means that all the communication is attractive much readable, no decoding, no translation or decryption. Look at an HTTP trace and you'll be attractive much able to read it, separate out all the GET requests and responses and it's not that solid to follow also. Of course, this is slightly upsetting in this world where we are told to encrypt and secure our identities, the method of transport which delivers most personal information operates almost totally in clear text.
Re: Force use of WiFi interface for HTTP Request
I just remember that you can use curl with specific interface. Download the binary for android, extract the binary to /sdcard/Automagic. I don't know if latest android (Oreo 8.1) support to execute command from /sdcard (AFAI try, always fail if without root).
Use the execute command
Use the execute command
Code: Select all
curl --interface wlan0 http://192.168.1.100/youriotdeviceaddress.htm
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Force use of WiFi interface for HTTP Request
Was this a no-go, or pending another release of EAP version 1.36.0-dev?Martin wrote:I could provide a new action to force the use of a particular network interface for network access in Automagic. I've never used this API of Android before so I have no experience if it actually works but let me try to add the action so we can test it.
Regards,
Martin
Re: Force use of WiFi interface for HTTP Request
We don't know yet. Martin probably has his own schedule on implementing various features. It always takes more time at the first addition, as many things need to be taken care. Planning, checking for possible crash, future update, and so many things. Unless it is a critical bug which need immediate attention (such as the last one on Start Activity, EAP 1.36.0). So many planning at first addition is also to reduce the possibility of the critical bug in the future.
I will just wait and use workaround first if possible. Many of my previous requests were added, but not in the order I request it. Some maybe easier (especially if it is just extension of current feature), some may take longer time, as it is new feature.
I will just wait and use workaround first if possible. Many of my previous requests were added, but not in the order I request it. Some maybe easier (especially if it is just extension of current feature), some may take longer time, as it is new feature.
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.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Force use of WiFi interface for HTTP Request
The option to specify the type of network to use in action HTTP Request is available in the EAP version:
Regards,
Martin
I've not added an action to change the default network type for all network accesses for Automagic since this could have unexpected side effects.added option in trigger HTTP Request to listen for requests on the WiFi interface only
Regards,
Martin