termux / termux-api

Termux add-on app which exposes device functionality as API to command line programs.
https://f-droid.org/en/packages/com.termux.api/
2.09k stars 432 forks source link

"termux-wallpaper -u <url>" says "Unknown host!" #559

Open mayureshw opened 1 year ago

mayureshw commented 1 year ago
termux-info 
Termux Variables:
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_VERSION=0.108
Packages CPU architecture:
arm
Subscribed repositories:
# sources.list
deb https://packages.termux.dev/apt/termux-main/ stable main
Updatable packages:
All packages up to date
termux-tools version:
1.31.0
Android version:
9
Kernel build information:
Linux localhost 3.18.120-21534220 #2 SMP PREEMPT Mon Jun 21 22:40:05 KST 2021 armv7l Android
Device manufacturer:
samsung
Device model:
SM-J415F

Problem description

termux-wallpaper -u option with a valid URL to a jpg, gives "Unknown host" error


$ termux-wallpaper -u <URL>

Unknown host!
drui9 commented 11 months ago

Still a problem? It works for me. Maybe supply the url too

mayureshw commented 11 months ago

It is an http:// URL. Would that matter. I tried some https:// URLs and those are working.

HusniMuhammad commented 10 months ago

It is an http:// URL. Would that matter. I tried some https:// URLs and those are working.

http urls never accepted. It's not secure. If you're the host of that url's domain/subdomain apply ssl/tls certificates

If it's helpful please close this issue

mayureshw commented 10 months ago

http vs https is a separate topic. How would that matter to a tool that just needs to download a file from a given URL? For example, wget, curl still download fine from http URLs.

sylirre commented 10 months ago

HTTP issue is related to API changes described in Android 9. Details explained in Google blog: https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html

HusniMuhammad commented 10 months ago

http vs https is a separate topic. How would that matter to a tool that just needs to download a file from a given URL? For example, wget, curl still download fine from http URLs.

HTTP issue is related to API changes described in Android 9. Details explained in Google blog: https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html

Yes

HusniMuhammad commented 10 months ago

http vs https is a separate topic. How would that matter to a tool that just needs to download a file from a given URL? For example, wget, curl still download fine from http URLs.

Because some times that tool needs to verify the url safe/not according Android sdks & older sdks doesn't have this feature

Alternative is, your can download that image from other tools like lftp and fetch it

If it's useful please close this issue as completed

HusniMuhammad commented 10 months ago

HTTP issue is related to API changes described in Android 9. Details explained in Google blog: https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html

Can you know how to make packages in termux github? I have problem here.