瀏覽代碼

Update README.android

Providing some workarounds about CA certificates and standard output
amtlib-dot-dll 10 年之前
父節點
當前提交
8f64d72cbc
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      README.android

+ 9 - 0
README.android

@@ -55,11 +55,19 @@ using ``--async-dns`` and specify DNS servers using
 
 
   --async-dns --async-dns-server=`getprop net.dns1`,`getprop net.dns2`
   --async-dns --async-dns-server=`getprop net.dns1`,`getprop net.dns2`
 
 
+Additionally, the CA certificates shipped with Android don't locate in
+the same place as those of normal Unix-like systems do, so this
+workaround might be useful to securely download files via HTTPS::
+
+   cat /etc/security/cacerts/* | aria2c --ca-certificate=/proc/self/fd/0 $@
+
 Because it is tedious to type these long parameters every time you use
 Because it is tedious to type these long parameters every time you use
 aria2c, the following wrapper shell script would be handy::
 aria2c, the following wrapper shell script would be handy::
 
 
     #!/system/bin/sh
     #!/system/bin/sh
+    cat /etc/security/cacerts/* | \
     /data/data/jackpal.androidterm/aria2c \
     /data/data/jackpal.androidterm/aria2c \
+      --ca-certificate=/proc/self/fd/0 \
       --async-dns \
       --async-dns \
       --async-dns-server=`getprop net.dns1`,`getprop net.dns2` \
       --async-dns-server=`getprop net.dns1`,`getprop net.dns2` \
       "$@"
       "$@"
@@ -71,6 +79,7 @@ Known Issues
 ------------
 ------------
 
 
 * Since Android does not have ``/dev/stdout``, ``-l-`` does not work.
 * Since Android does not have ``/dev/stdout``, ``-l-`` does not work.
+  ``/proc/self/fd/0`` is a workaround for Android.
 
 
 * Android Terminal Emulator sometimes stops updating console. It looks
 * Android Terminal Emulator sometimes stops updating console. It looks
   like aria2c hangs, but aria2c continues to run.
   like aria2c hangs, but aria2c continues to run.