动态访问密钥
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Outline 提供两种类型的访问密钥:静态访问密钥和动态访问密钥。静态密钥对密钥本身内的所有连接信息进行编码,动态密钥则对连接信息的位置进行编码,使您能够远程存储这些信息,并根据需要进行更改。这意味着您可以更新服务器配置,而无需生成新密钥并将其分发给用户。本文档介绍了如何使用动态访问密钥来更灵活、更高效地管理 Outline 服务器。
您可以通过以下三种格式指定动态访问密钥所用的访问信息:
使用 ss://
链接
Outline 客户端 1.8.1 及以上版本。
您可以直接使用现有 ss://
链接。如果您不需要频繁更改服务器、端口或加密方法,但又希望能够灵活更新服务器地址,那么此方法是理想选择。
示例:
ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpleGFtcGxl@outline-server.example.com:8388/?outline=1
使用 JSON 对象
Outline 客户端 1.8.0 及以上版本。
此种方法可以让您更灵活地管理用户 Outline 连接的各个方面。您可以用这种方式更新服务器、端口、密码和加密方法。
示例:
{
"server": "outline-server.example.com",
"server_port": 8388,
"password": "example",
"method": "chacha20-ietf-poly1305"
}
- server:VPN 服务器的域名或 IP 地址。
- server_port:运行 VPN 服务器的端口号。
- password:连接到 VPN 所需的密码。
- method:VPN 使用的加密方法。请参阅 Shadowsocks 支持的 AEAD 加密。
使用 YAML 对象
Outline 客户端 1.15.0 及以上版本。
此方法与前面的 JSON 方法类似,但它利用 Outline 的高级配置格式增加了更多灵活性。您可以更新服务器、端口、密码、加密方法等等。
示例:
transport:
$type: tcpudp
tcp:
$type: shadowsocks
endpoint: outline-server.example.com:8388
cipher: chacha20-ietf-poly1305
secret: example
udp:
$type: shadowsocks
endpoint: outline-server.example.com:8388
cipher: chacha20-ietf-poly1305
secret: example
- transport:定义要使用的传输协议(本例中为 TCP 和 UDP)。
- tcp/udp:指定每种协议的配置。
- $type:指示配置类型(本例中为 Shadowsocks)。
- endpoint:VPN 服务器的域名或 IP 地址和端口。
- secret:连接到 VPN 所需的密码。
- cipher:VPN 使用的加密方法。请参阅 Shadowsocks 支持的 AEAD 加密。
如需详细了解配置 Outline 服务器访问权限的所有方式(包括传输、端点、拨号器和数据包监听器),请参阅访问密钥配置。
如果您已有静态访问密钥,则可以从中提取信息来创建基于 JSON 或 YAML 的动态访问密钥。静态访问密钥遵循以下模式:
SS-URI = "ss://" userinfo "@" hostname ":" port [ "/" ] [ "#" tag ]
userinfo = websafe-base64-encode-utf8(method ":" password)
method ":" password
示例:
ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpleGFtcGxl@outline-server.example.com:8388/?outline=1
您已了解了如何创建动态访问密钥,而为访问密钥配置选择一个合适的托管平台也非常重要。进行选择时,请综合考虑平台的可靠性、安全性、易用性和抗审查能力等因素。平台能否始终如一地提供访问密钥信息而不中断?平台能否提供适当的安全措施来保护您的配置?在平台上管理访问密钥信息的难易程度如何?平台能否在实行互联网审查制度的地区顺畅访问?
如果访问信息有可能受到限制,不妨考虑托管在具有抗审查能力的平台上,例如 Google 云端硬盘、pad.riseup.net、Amazon S3(提供路径样式访问)、Netlify 或 GitHub 机密 Gist。请评估具体部署需求,选择能够满足您的可访问性和安全性要求的平台。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-13。
[null,null,["最后更新时间 (UTC):2025-03-13。"],[[["\u003cp\u003eThe Outline Client now supports Dynamic Access Keys, allowing for real-time updates to VPN access information without reissuing keys.\u003c/p\u003e\n"],["\u003cp\u003eDynamic Access Keys can host access information as either an \u003ccode\u003ess://\u003c/code\u003e link, simplifying setup for those needing only server switching, or as a JSON object to enable changes to server, port, password, and encryption method.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Sheets, Riseup pad, S3, and Netlify are presented as censorship-resistant options for storing dynamic access information, with clear instructions on how to configure each for use with \u003ccode\u003essconf://\u003c/code\u003e protocol.\u003c/p\u003e\n"],["\u003cp\u003eExisting static access keys can be used to derive the necessary information (server, port, password, method) for creating a JSON-based dynamic key, which is done by decoding the base64 password, then filling in each of the relevant fields.\u003c/p\u003e\n"],["\u003cp\u003eCustom error messages can be sent to users via Dynamic Access Keys by adding an "error" key to the JSON object, allowing for tailored feedback in case of connection failures.\u003c/p\u003e\n"]]],["The Outline Client supports Dynamic Access Keys, allowing VPN information to be hosted remotely and updated dynamically. This enables changing the VPN's location, port, password, and encryption method without re-issuing keys. Access information can be stored as an `ss://` link or a JSON object containing the server, server_port, password, and method. Censorship-resistant options like Google Sheets, pad.riseup.net, S3, and Netlify are suggested for hosting. Dynamic access keys are created by replacing `https://` with `ssconf://` in the access information URL, the user can also include an error message for their end user.\n"],null,["# Dynamic Access Keys\n\nOutline offers two types of access keys: static and dynamic. Static keys encode\nall the connection information within the key itself, while dynamic keys encode\nthe location of the connection information, allowing you to store that\ninformation remotely and change it if needed. This means you can update your\nserver configuration without having to generate and distribute new keys to your\nusers. This document explains how to use dynamic access keys for more flexible\nand efficient management of your Outline server.\n\nThere are three formats to specify the access information that will be used by\nyour dynamic access keys:\n\n### Use an `ss://` Link\n\n*Outline Client v1.8.1+.*\n\nYou can directly use an existing `ss://` link. This method is ideal if you don't\nneed to frequently change the server, port, or encryption method, but still want\nthe flexibility to update the server address.\n\n**Example:** \n\n ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpleGFtcGxl@outline-server.example.com:8388/?outline=1\n\n### Use a JSON object\n\n*Outline Client v1.8.0+.*\n\nThis method offers more flexibility for managing all aspects of your users'\nOutline connection. You can update the server, port, password, and encryption\nmethod this way.\n\n**Example:** \n\n {\n \"server\": \"outline-server.example.com\",\n \"server_port\": 8388,\n \"password\": \"example\",\n \"method\": \"chacha20-ietf-poly1305\"\n }\n\n- **server:** The domain or IP address of your VPN server.\n- **server_port:** The port number your VPN server is running on.\n- **password:** The password required to connect to the VPN.\n- **method:** The encryption method used by the VPN. Refer to the Shadowsocks supported [AEAD ciphers](https://shadowsocks.org/doc/aead.html)\n\n### Use a YAML Object\n\n*Outline Client v1.15.0+.*\n\nThis method is similar to the previous JSON method but adds even more\nflexibility by leveraging Outline's advanced configuration format. You can\nupdate the server, port, password, encryption method, and much more.\n\n**Example:** \n\n transport:\n $type: tcpudp\n tcp:\n $type: shadowsocks\n endpoint: outline-server.example.com:8388\n cipher: chacha20-ietf-poly1305\n secret: example\n udp:\n $type: shadowsocks\n endpoint: outline-server.example.com:8388\n cipher: chacha20-ietf-poly1305\n secret: example\n\n- **transport:** Defines the transport protocols to be used (TCP and UDP in this case).\n- **tcp/udp:** Specifies the configuration for each protocol.\n - **$type:** Indicates the type of configuration, here it's shadowsocks.\n - **endpoint:** The domain or IP address and port of your VPN server.\n - **secret:** The password required to connect to the VPN.\n - **cipher:** The encryption method used by the VPN. Refer to the Shadowsocks supported [AEAD\n ciphers](https://shadowsocks.org/doc/aead.html).\n\nSee [Access Key Configuration](/outline/docs/guides/service-providers/config) for details on all the ways you can\nconfigure access to your Outline server, including transports, endpoints,\ndialers, and packet listeners.\n\nExtract Access Information from a Static Key\n--------------------------------------------\n\nIf you have an existing static access key, you can extract the information to\ncreate a JSON- or YAML-based dynamic access key. Static access keys follow the\nfollowing pattern: \n\n SS-URI = \"ss://\" userinfo \"@\" hostname \":\" port [ \"/\" ] [ \"#\" tag ]\n userinfo = websafe-base64-encode-utf8(method \":\" password)\n method \":\" password\n\nExample: \n\n ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpleGFtcGxl@outline-server.example.com:8388/?outline=1\n\n- **Server:** `outline-server.example.com`\n- **Server Port:** `8388`\n- **User Info:** `Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTpleGFtcGxl` Decoded as\n [base64](https://en.wikipedia.org/wiki/Base64) using a tool like the [Google\n Admin Toolbox\n Encode/Decode](https://toolbox.googleapps.com/apps/encode_decode/)\n\n - **Method** : `chacha20-ietf-poly1305`\n - **Password** : `example`\n\nChoose a Hosting Platform\n-------------------------\n\nNow that you understand how to create dynamic access keys, it's important to\nchoose a suitable hosting platform for your access key configuration. When\nmaking this decision, consider factors like the platform's reliability,\nsecurity, ease of use, and censorship resistance. Will the platform consistently\nserve your access key information without downtime? Does it offer appropriate\nsecurity measures to protect your configuration? How easy is it to manage your\naccess key information on the platform? Is the platform accessible in regions\nwith internet censorship?\n\nFor situations where access to information might be restricted, consider hosting\non censorship-resistant platforms like [Google Drive](https://drive.google.com),\n[pad.riseup.net](https://pad.riseup.net/), [Amazon\nS3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)\n(with path-style access),\n[Netlify](https://dev.to/alexmercedcoder/delivering-json-data-with-netlify-1j96),\nor [GitHub secret\ngists](https://docs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists).\nEvaluate the specific needs of your deployment and choose a platform that aligns\nwith your requirements for accessibility and security."]]