1 check uclient-fetch usage: 2 3 $ [ -n "$BUILD_BIN_DIR" ] && export PATH="$BUILD_BIN_DIR:$PATH" 4 $ alias uc='uclient-fetch-san' 5 6 $ uc 7 Usage: uclient-fetch-san [options] <URL> 8 Options: 9 \t-4\t\t\t\tUse IPv4 only (esc) 10 \t-6\t\t\t\tUse IPv6 only (esc) 11 \t-O <file>\t\t\tRedirect output to file (use "-" for stdout) (esc) 12 \t-P <dir>\t\t\tSet directory for output files (esc) 13 \t--quiet | -q\t\t\tTurn off status messages (esc) 14 \t--continue | -c\t\t\tContinue a partially-downloaded file (esc) 15 \t--header='Header: value'\tAdd HTTP header. Multiple allowed (esc) 16 \t--user=<user>\t\t\tHTTP authentication username (esc) 17 \t--password=<password>\t\tHTTP authentication password (esc) 18 \t--user-agent | -U <str>\t\tSet HTTP user agent (esc) 19 \t--post-data=STRING\t\tuse the POST method; send STRING as the data (esc) 20 \t--post-file=FILE\t\tuse the POST method; send FILE as the data (esc) 21 \t--spider | -s\t\t\tSpider mode - only check file existence (esc) 22 \t--timeout=N | -T N\t\tSet connect/request timeout to N seconds (esc) 23 \t--proxy=on | -Y on\t\tEnable interpretation of proxy env vars (default) (esc) 24 \t--proxy=off | -Y off | (esc) 25 \t--no-proxy \t\tDisable interpretation of proxy env vars (esc) 26 27 HTTPS options: 28 \t--ca-certificate=<cert>\t\tLoad CA certificates from file <cert> (esc) 29 \t--no-check-certificate\t\tdon't validate the server's certificate (esc) 30 \t--ciphers=<cipherlist>\t\tSet the cipher list string (esc) 31 32 [1] 33 34 download lorem ipsum verbose: 35 36 $ uc -O lorem http://127.0.0.1:1922/lorem 37 Downloading 'http://127.0.0.1:1922/lorem' 38 Connecting to 127.0.0.1:1922 39 Writing to 'lorem' 40 \r (no-eol) (esc) 41 lorem 100% |*******************************| 4111 0:00:00 ETA 42 Download completed (4111 bytes) 43 44 $ md5sum lorem 45 887943f7c25bd6cec4570c405241b425 lorem 46 47 download lorem ipsum quiet: 48 49 $ uc -q -O lorem http://127.0.0.1:1922/lorem 50 51 $ md5sum lorem 52 887943f7c25bd6cec4570c405241b425 lorem 53 54 check that HTTP 404 errors are handled properly: 55 56 $ uc http://127.0.0.1:1922/does-not-exist 57 Downloading 'http://127.0.0.1:1922/does-not-exist' 58 Connecting to 127.0.0.1:1922 59 HTTP error 404 60 [8] 61 62 $ uc -q http://127.0.0.1:1922/does-not-exist 63 [8] 64 65 check that SSL works: 66 67 $ uc -q -O /dev/null 'https://www.openwrt.org' 68 69 $ uc -q -O /dev/null 'https://letsencrypt.org' 70 71 $ uc -O /dev/null 'https://downloads.openwrt.org/does-not-exist' 2>&1 | grep error 72 HTTP error 404 73 74 check handling of certificate issues: 75 76 $ uc -O /dev/null 'https://self-signed.badssl.com/' 2>&1 | grep error 77 Connection error: Invalid SSL certificate 78 79 $ uc -O /dev/null 'https://untrusted-root.badssl.com/' 2>&1 | grep error 80 Connection error: Invalid SSL certificate 81 82 $ uc -O /dev/null 'https://expired.badssl.com/' 2>&1 | grep error 83 Connection error: Invalid SSL certificate 84 85 $ uc --ca-certificate=/dev/null -O /dev/null 'https://www.openwrt.org/' 2>&1 | grep error 86 Connection error: Invalid SSL certificate 87 88 check that certificate issues can be disabled: 89 90 $ uc --no-check-certificate -q -O /dev/null 'https://self-signed.badssl.com/' 91 92 $ uc --no-check-certificate -q -O /dev/null 'https://untrusted-root.badssl.com/' 93 94 $ uc --no-check-certificate -q -O /dev/null 'https://expired.badssl.com/'
This page was automatically generated by LXR 0.3.1. • OpenWrt