0

asus ac68 is a router. I have installed the latest firmware(merlin) 384.11.

curl -V

curl 7.64.1 (arm-unknown-linux-gnu) libcurl/7.64.1 OpenSSL/1.0.2r zlib/1.2.5
Release-Date: 2019-03-27
Protocols: file ftp ftps http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps tftp
Features: HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

set:

HISTFILE='/root/.ash_history'
HOME='/root'
HTTPS_PROXY='http://192.168.2.110:1920'
HTTP_PROXY='http://192.168.2.110:1920'
PATH='/bin:/usr/bin:/sbin:/usr/sbin:/home/kasim:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin'
PPID='1679'
PS1='\u@\h:\w\$ '
PS2='> '
PS4='+ '
PWD='/tmp/home/root'
SHELL='/bin/sh'
SHLVL='1'
TERM='xterm-256color'
TMOUT='1200'
USER='xxxxx'
_='install'
http_proxy='http://192.168.2.110:1920'
https_proxy='http://192.168.2.110:1920'

wget is working good with proxy, but curl doesn't . I have to add -x option . But there are many scripts which utlize curl , I can't check and modify every one , so I wonder how can I make curl work with system global proxy ?

PS: I don't have a usb driver to install Entware, update or install package is difficult .

1

2 solutions to this :

  • you can create a shell alias such as : alias curl='curl --proxy http://[host]:[port]'
  • or define the proxy settings in a cURL config file : echo 'proxy = [host]:[port]' > ~/.curlrc

I've not been able to make this work using environment variables.

NB : your configuration defines HTTPS_PROXY and HTTP_PROXY both as uppercase and lowercase variables, which looks pretty error-prone to me.

  • alias seems good idea. I have bash functions proxyon and proxyoff , which trend to make sure all softwares go through my proxy by settings . As I remember , some only work with uppercase variables . – Mithril May 15 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.