ipapk-server:自动生成自签名 HTTPS 服务器,可以快速安装 ipa、apk

EfrRoten 8年前
   <h2>简介</h2>    <p>自动生成自签名HTTPS服务器,可以快速安装ipa、apk,基于 <a href="/misc/goto?guid=4959734762601630009" rel="nofollow,noindex">ios-ipa-server</a> 开发</p>    <h2>支持</h2>    <ul>     <li>OS X</li>     <li>Ubuntu</li>     <li>其他平台未测试</li>    </ul>    <h2>需要</h2>    <ul>     <li><a href="/misc/goto?guid=4958867323246690255" rel="nofollow,noindex">nodejs</a></li>    </ul>    <h2>安装</h2>    <pre>  <code class="language-groovy">$ npm install -g ipapk-server</code></pre>    <p>Ubuntu 64 bit 需要另外安装</p>    <pre>  <code class="language-groovy">sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5  sudo apt-get install lib32z1</code></pre>    <h2>用法</h2>    <pre>  <code class="language-groovy">Usage: ipapk-server [option]    Options:    -h, --help                output usage information  -V, --version             output the version number  -p, --port <port-number>  set port for server (defaults is 1234)</code></pre>    <h2>开启服务</h2>    <pre>  <code class="language-groovy">$ ipapk-server    # 推荐使用pm2/forever等进程管理运行服务</code></pre>    <h2>下载</h2>    <p>手机浏览器中打开 https://ip:port/</p>    <ul>     <li>记得输https</li>     <li>iOS下载一定要使用Safari</li>    </ul>    <p><img src="https://simg.open-open.com/show/2cfc1c436aff35fb61ba3a538325ceee.jpg"> <img src="https://simg.open-open.com/show/d19711c96ec7bbb2992ab6e11a795e5a.jpg"> 该项目提供了默认的web下载页面,同时也提供了API,方便集成到其他平台。</p>    <h2>API</h2>    <h3>包上传</h3>    <p>path:</p>    <pre>  <code class="language-groovy">POST /upload</code></pre>    <p>param:</p>    <pre>  <code class="language-groovy">package:安装包文件, reqiured  changelog:ChangeLog, optional</code></pre>    <p>response:</p>    <pre>  <code class="language-groovy">{    platform: 'ios',    build: '1608051045',    bundleID: 'com.jianshu.Hugo',    version: '2.11.4',    name: 'Hugo',    guid: '46269d71-9fda-76fc-3442-a118d6b08bf1'   }</code></pre>    <p>命令行: curl 'https://ip:port/upload' -F "package=@文件路径" -F "changelog=xxx" --insecure ,不能去掉 @</p>    <h3>所有App</h3>    <p>path:</p>    <pre>  <code class="language-groovy">GET /apps/:platform/:page</code></pre>    <p>params:</p>    <pre>  <code class="language-groovy">:platform: ios or android  :page: 分页,默认1</code></pre>    <p>response:</p>    <pre>  <code class="language-groovy">[      {          id: 6,          guid: "46269d71-9fda-76fc-3442-a118d6b08bf1",          bundleID: "com.jianshu.Hugo",          version: "2.11.4",          build: "1608051045",          icon: "https://10.20.30.233:1234/icon/46269d71-9fda-76fc-3442-a118d6b08bf1.png",          name: "Hugo",          uploadTime: "2016-12-01 20:50:05",          platform: "ios",          url: "itms-services://?action=download-manifest&url=https://10.20.30.233:1234/plist/46269d71-9fda-76fc-3442-a118d6b08bf1",          changelog: "add feature"      },      {          id: 3,          guid: "baac66f0-0e7b-f72c-40e3-378aab26fd9b",          bundleID: "com.jianshu.victor",          version: "1.1.0",          build: "1611251530",          icon: "https://10.20.30.233:1234/icon/baac66f0-0e7b-f72c-40e3-378aab26fd9b.png",          name: "Victor",          uploadTime: "2016-11-26 20:47:43",          platform: "ios",          url: "itms-services://?action=download-manifest&url=https://10.20.30.233:1234/plist/baac66f0-0e7b-f72c-40e3-378aab26fd9b",          changelog: "bug fix"      }  ]</code></pre>    <h3>某个App的所有版本</h3>    <p>path:</p>    <pre>  <code class="language-groovy">/apps/:platform/:bundleID/:page</code></pre>    <p>params:</p>    <pre>  <code class="language-groovy">:platform: ios or android  :bundleID: app bundleID  :page: 分页,默认1</code></pre>    <p>response:</p>    <pre>  <code class="language-groovy">[      {          id: 5,          guid: "a8573b7a-18bc-1925-f2b4-8842db2153aa",          bundleID: "com.jianshu.Hugo",          version: "2.11.4",          build: "1608051045",          icon: "https://10.20.30.233:1234/icon/a8573b7a-18bc-1925-f2b4-8842db2153aa.png",          name: "Hugo",          uploadTime: "2016-11-26 21:00:51",          platform: "ios",          url: "itms-services://?action=download-manifest&url=https://10.20.30.233:1234/plist/a8573b7a-18bc-1925-f2b4-8842db2153aa",          changelog: "add feature"      },      {          id: 6,          guid: "46269d71-9fda-76fc-3442-a118d6b08bf1",          bundleID: "com.jianshu.Hugo",          version: "2.11.4",          build: "1608051045",          icon: "https://10.20.30.233:1234/icon/46269d71-9fda-76fc-3442-a118d6b08bf1.png",          name: "Hugo",          uploadTime: "2016-12-01 20:50:05",          platform: "ios",          url: "itms-services://?action=download-manifest&url=https://10.20.30.233:1234/plist/46269d71-9fda-76fc-3442-a118d6b08bf1",          changelog: "add feature"      }  ]</code></pre>    <h2>SSL 证书</h2>    <p>该项目默认使用自签名的证书,如果你有正规CA颁发的证书,可替换 ~/.ipapk-server 目录下的证书。</p>    <h2>TODO</h2>    <ul>     <li>token验证</li>     <li>国际化支持</li>    </ul>    <h2>贡献</h2>    <p><a href="/misc/goto?guid=4959734762719394645" rel="nofollow,noindex">zhao0</a> 、 <a href="/misc/goto?guid=4959734762806314842" rel="nofollow,noindex">mask2</a></p>    <p> </p>    <p> </p>