|
1 | 1 | title: Get And Install SSL Certificate
|
2 | 2 | ---
|
3 | 3 |
|
4 |
| -> 如果你愿意帮助hiproxy编写文档,请联系zdying@live.com, 谢谢! |
5 |
| -> |
6 | 4 | > If you are willing to help hiproxy to write documentation, please contact zdying@live.com, thank you!
|
7 | 5 |
|
8 |
| -hiporxy会自己生成一个根证书,扮演CA的角色(Hiproxy Custom CA)。hiproxy在代理https请求的时候,会自动生成证书并使用hiproxy的根证书签名。 |
| 6 | +Hiproxy can generate its own root certificate. You can think it as a CA (Hiproxy Custom CA). If a https request need hiproxy to forward, hiproxy would use its own root certificate to generate automatically a secure certification of that https request. |
9 | 7 |
|
10 |
| -由于系统是不信任hiproxy根证书的,所以需要我们自己手动安装信任hiproxy的根证书。 |
| 8 | +Hiproxy own root certificate is not trusted by OS, therefore, you have to install the root certificate by manual to let OS know it as trusted one. |
11 | 9 |
|
12 |
| -## 下载证书 |
| 10 | +## Download The Certificate |
13 | 11 |
|
14 |
| -启动hiproxy服务之后(假设端口号是`5525`),可以访问<http://127.0.0.1:5525/ssl-certificate>获取**Hiproxy Custom CA**的根证书。 |
| 12 | +As soon as hiproxy is started (suppose the port number is `5525`), you can go <http://127.0.0.1:5525/ssl-certificate> to get the root certificate of **Hiproxy Custom CA**. |
15 | 13 |
|
16 |
| -这个地址,可以在<http://127.0.0.1:5525/>中找到,如下图: |
| 14 | +You can get the URL from <http://127.0.0.1:5525/> by following below image: |
17 | 15 |
|
18 | 16 | <img src="../../images/hiproxy_start_page.png" width="500" />
|
19 | 17 |
|
20 |
| -## 安装证书 |
| 18 | +## Install Certificate |
21 | 19 |
|
22 |
| -下面将分别介绍OSX、iOS、Windows和Android中如何安装根证书。 |
| 20 | +The following describes how the root certificate is installed in OSX, iOS, Windows and Android. |
23 | 21 |
|
24 |
| -### OSX系统 |
| 22 | +### OSX System |
25 | 23 |
|
26 |
| -1. 下载完成根证书之后,双击`Hiproxy_Custom_CA_Certificate.pem`导入证书到钥匙串。 |
| 24 | +1. Double click downloaded `Hiproxy_Custom_CA_Certificate.pem` to import the certificate to keychain. |
27 | 25 |
|
28 |
| -2. 在弹出的对话框中输入用户密码。 |
| 26 | +2. Input your username and password in popuped dialog. |
29 | 27 |
|
30 |
| -3. 此时证书是不受信任状态,双击刚才导入的证书。 |
| 28 | +3. Now the certificate is not trusted. You should double click the certificate which is imported in previous step. |
31 | 29 |
|
32 | 30 | <img src="../../images/import_root_cert.png" width="680" />
|
33 | 31 |
|
34 |
| -4. 在**信任** > **使用此证书时**下面选择**始终信任**。 |
| 32 | +4. Choose ** Always trust** by following **Trust** > **While using this certificate**. |
35 | 33 |
|
36 | 34 | <img src="../../images/trust_root_cert.png" width="680" />
|
37 | 35 |
|
38 |
| -5. 关闭对话框,此时证书已经是被信任状态。 |
| 36 | +5. Close the dialog. Now the certificate is in trusted state. |
39 | 37 |
|
40 | 38 | <img src="../../images/root_cert_trusted.png" width="680" />
|
41 | 39 |
|
42 | 40 |
|
43 | 41 | ### iOS系统
|
44 | 42 |
|
45 |
| -1. 下载完成根证书之后发送到手机并打开。 |
| 43 | +1. Send the downloaded certificate to iPhone then open it in iOS. |
46 | 44 |
|
47 |
| -2. 点击右上角的**安装**。 |
| 45 | +2. Click **Install** on the top right of the view. |
48 | 46 |
|
49 | 47 | <img src="../../images/ios_install_cert_1.jpg" width="375" />
|
50 | 48 |
|
51 |
| -3. 再次点击右上角的**安装**。 |
| 49 | +3. Click **Install** to confirm. |
52 | 50 |
|
53 | 51 | <img src="../../images/ios_install_cert_2.jpg" width="375" />
|
54 | 52 |
|
55 |
| -4. 完成安装,点击右上角**完成**退出。 |
| 53 | +4. After complate installing, click **Complete** to finish and exit installing. |
56 | 54 |
|
57 | 55 | <img src="../../images/ios_install_cert_3.jpg" width="375" />
|
58 | 56 |
|
59 |
| -5. 如果**iOS系统版本 >= 10.3**,需要在**设置** > **通用** > **关于本机**中点击**证书信任设置**。 |
| 57 | +5. If the **iOS version >= 10.3**, you have to click **Certificate trust settings** by following **Settings** > **General** > **About this iPhone**. |
60 | 58 |
|
61 | 59 | <img src="../../images/ios_install_cert_4.jpg" width="375" />
|
62 | 60 |
|
63 |
| -6. 打开开关**Hiproxy Custom CA**。 |
| 61 | +6. Open the switcher on **Hiproxy Custom CA**. |
64 | 62 |
|
65 | 63 | <img src="../../images/ios_install_cert_5.jpg" width="375" />
|
66 | 64 |
|
67 | 65 | ### Windows
|
68 | 66 |
|
69 |
| -1. 下载完成根证书之后,双击`Hiproxy_Custom_CA_Certificate.crt`安装证书。 |
| 67 | +1. Double click downloaded `Hiproxy_Custom_CA_Certificate.crt` to install the certificate. |
70 | 68 |
|
71 |
| -2. 在弹出的对话框中点击**安装证书**。 |
| 69 | +2. Click **Install certificate** on the popuped dialog. |
72 | 70 |
|
73 | 71 | <img src="../../images/windows_install_cert.png" width="420" />
|
74 | 72 |
|
75 |
| -3. 点击**下一步**。 |
| 73 | +3. Click **Next**. |
76 | 74 |
|
77 | 75 | <img src="../../images/windows_step_1.png" width="420" />
|
78 | 76 |
|
79 |
| -4. 选择**将所有的证书放入下列存储(P)**,点击**浏览(R)**,然后选择**受信任的根证书颁发机构**,点击**确定**。 |
| 77 | +4. Choose **Persist all certificates in below storage(P)** then click **Browse(R)** and select **Trusted CA**, click **OK** |
80 | 78 |
|
81 | 79 | <img src="../../images/windows_step_2.png" width="420" />
|
82 | 80 |
|
83 |
| -5. 点击**下一步**、**完成**。根据页面提示完成根证书安装。。 |
| 81 | +5. Click **Next**, then **Finish**. Complete the certificate installing by following wizard. |
84 | 82 |
|
85 | 83 | <img src="../../images/windows_install_finish.png" width="420" />
|
86 | 84 |
|
87 | 85 |
|
88 | 86 | ### Android
|
89 | 87 |
|
90 |
| -1. 下载完成根证书之后发送到手机。 |
| 88 | +1. Download the certificate and send it to mobile. |
91 | 89 |
|
92 |
| -2. 在**设置** > **安全**中点击**从SD卡安装**。 |
| 90 | +2. Click **Install from SD card** by following **Settings** > **Security**. |
93 | 91 |
|
94 | 92 | <img src="../../images/android_install_cert_1.png" width="375" />
|
95 | 93 |
|
96 |
| -3. 输入解锁密码,然后输入证书名称,比如**HiproxyCustomCA**,点击**确定**。 |
| 94 | +3. Input the unlock password then certificate name, for example **HiproxyCustomCA**, then click **OK**. |
97 | 95 |
|
98 | 96 | <img src="../../images/android_install_cert_2.png" width="375" />
|
99 | 97 |
|
100 |
| -4. 在**设置** > **安全** > **受信任的证书** > **用户**中,如果能看到hiproxy的根证书,表示安装成功。 |
| 98 | +4. Follow **Settings** > **Security** > **Trusted certificate** > **Users**. If you can find hiproxy root certificate, it succeeds. |
101 | 99 |
|
102 | 100 | <img src="../../images/android_install_cert_3.png" width="375" />
|
0 commit comments