如何注册协议(类似tencent://…)

本文介绍了如何在Windows、Linux和OSX系统中注册自定义URL协议。通过注册表设置或配置文件,可以实现特定前缀的URL链接自动调用指定的应用程序。例如,通过设置可以在点击tencent://开头的链接时启动QQ程序。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

微软官方说明:http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/pluggable/overview/appendix_a.asp

这个问题是今晚 Easy 问我的,他想实现一个类似于腾讯的 tencent://… 协议功能,即页面上或地址栏里的链接只要输入带有 tencent://… 的协议,就会自动调用一个已写好的程序执行该协议的操作。之前自己也没研究过这方面的东东,上网查了一下,找到一篇很不错的介绍:Register protocol,此文中对于 Windows、Linux 和 OS X 操作系统如何注册协议都有说明。比如说 Windows,其实只需写入注册表,即可实现协议与执行程序的关联。例如腾讯的协议注册表如下:

[HKEY_CLASSES_ROOT/TENCENT]
@=”TencentProtocol”
“URL Protocol”=”D://Program Files//Tencent//QQ//Timwp.exe”

[HKEY_CLASSES_ROOT/TENCENT/DefaultIcon]
@=”D://Program Files//Tencent//QQ//Timwp.exe,1″

[HKEY_CLASSES_ROOT/TENCENT/shell]

[HKEY_CLASSES_ROOT/TENCENT/shell/open]

[HKEY_CLASSES_ROOT/TENCENT/shell/open/command]
@=”/”D://Program Files//Tencent//QQ//Timwp.exe/” /”%1/”"

此注册表所实现的就是当浏览器(或其它)碰到 tencent://… 时,自动调用 Timwp.exe,并把 tencent://… 地址作为第一个参数传递给 Timwp.exe。

更多参见:Registering an Application to a URL Protocol。


附:原文
程序代码:

A protocol is a method that is used to send, receive, and handle information over a connection. Common protocols viewed from the browser include http, ftp, and mailto. In order for you to view information sent over a specific protocol, it must be registered. Once registered, the protocol can then be handled by the program you specify, such as your browser or a 3rd party viewer. This means that a hyperlink ( e.g. foo://fred ) can use the handler for protocol foo to open the file named fred.

Contents [hide]
1 Registering an unsupported protocol
1.1 Windows
1.2 Linux
1.3 OS X
2 Redirecting a registered protocol
 


[edit]Registering an unsupported protocol
Mozilla products utilize protocols defined internally, as well as those defined by the operating system. You can add the ability to use an unsupported protocol by registering it. The OS-specific method of doing this is described below.

[edit]Windows
Create the registry .reg file, replacing foo with your unregistered protocol, and the path with whatever handler program you want to run. Then merge it into the Windows registry.


REGEDIT4

[HKEY_CLASSES_ROOT/foo]
@="URL:foo Protocol"
"URL Protocol"=""

[HKEY_CLASSES_ROOT/foo/shell]

[HKEY_CLASSES_ROOT/foo/shell/open]

[HKEY_CLASSES_ROOT/foo/shell/open/command]
@="/"C://Program Files//Application//program.exe/" /"%1/""
See Registering an Application to a URL Protocol for additional information.

[edit]Linux
Registration is unnecessary. Simply associate whatever proto: with a program through Firefox: Example: Add the sip: protocol to launch kphone for VoIP calls in Firefox:

- Type about:config into the address bar
- Right-click create new boolean value: network.protocol-handler.external.sip and set to true
- Right-click create new boolean value: network.protocol-handler.warn-external.sip and set to false
- Right-click create new string value: network.protocol-handler.app.sip and set to /usr/bin/kphone
This will actually launch kphone. Not sure if it will dial though. That is untested :)

You can also optionally register the protocol with whatever window manager you are using. In KDE this is done through Control Center - KDE Components - File Associations. This step is usually unnecessary unless your window manager has a custom browser, such as konqueror.

[edit]OS X
Probably very similar to Linux (above).

[edit]Redirecting a registered protocol
If the protocol is already handled by the browser, you can specify what program will be used as a handler to open the file. To do this, add the pref:
network.protocol-handler.app.foo as a string with value C:/Program Files/Application/program.exe
Note: If the path or name is incorrect, the browser will display an error saying "protocol (foo) isn't associated with any program". (See bug 312953).

You may also need to use the following prefs, although this is uncertain:
network.protocol-handler.external.foo = true
network.protocol-handler.expose.foo = false

Retrieved from "http://kb.mozillazine.org/Register_protocol"
 

 

本文来自优快云博客,转载请标明出处:http://blog.youkuaiyun.com/xiepan110/archive/2008/01/20/2053992.aspx

正在下载面板文件,请稍等................... ============================================== --2025-07-03 15:11:30-- https://hk1-node.bt.cn/install/src/panel6.zip Resolving hk1-node.bt.cn (hk1-node.bt.cn)... 103.179.243.14 Connecting to hk1-node.bt.cn (hk1-node.bt.cn)|103.179.243.14|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 52858191 (50M) [application/zip] Saving to: ‘panel.zip’ panel.zip 100%[================================================================================================================>] 50.41M 6.18MB/s in 11s 2025-07-03 15:11:41 (4.59 MB/s) - ‘panel.zip’ saved [52858191/52858191] --2025-07-03 15:11:43-- https://hk1-node.bt.cn/install/src/bt7.init Resolving hk1-node.bt.cn (hk1-node.bt.cn)... 103.179.243.14 Connecting to hk1-node.bt.cn (hk1-node.bt.cn)|103.179.243.14|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 18807 (18K) [application/octet-stream] Saving to: ‘/etc/init.d/bt’ /etc/init.d/bt 100%[================================================================================================================>] 18.37K --.-KB/s in 0.03s 2025-07-03 15:11:44 (609 KB/s) - ‘/etc/init.d/bt’ saved [18807/18807] --2025-07-03 15:11:44-- https://hk1-node.bt.cn/install/src/bt7.init Resolving hk1-node.bt.cn (hk1-node.bt.cn)... 103.179.243.14 Connecting to hk1-node.bt.cn (hk1-node.bt.cn)|103.179.243.14|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 18807 (18K) [application/octet-stream] Saving to: ‘/www/server/panel/init.sh’ /www/server/panel/init.sh 100%[================================================================================================================>] 18.37K --.-KB/s in 0.03s 2025-07-03 15:11:44 (593 KB/s) - ‘/www/server/panel/init.sh’ saved [18807/18807] --2025-07-03 15:11:44-- https://hk1-node.bt.cn/install/conf/softList.conf Resolving hk1-node.bt.cn (hk1-node.bt.cn)... 103.179.243.14 Connecting to hk1-node.bt.cn (hk1-node.bt.cn)|103.179.243.14|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2250 (2.2K) [application/octet-stream] Saving to: ‘/www/server/panel/data/softList.conf’ /www/server/panel/data/softList.conf 100%[================================================================================================================>] 2.20K --.-KB/s in 0s 2025-07-03 15:11:44 (87.4 MB/s) - ‘/www/server/panel/data/softList.conf’ saved [2250/2250] Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: docxtpl==0.16.7 in /www/server/panel/pyenv/lib/python3.7/site-packages (0.16.7) Requirement already satisfied: six in /www/server/panel/pyenv/lib/python3.7/site-packages (from docxtpl==0.16.7) (1.16.0) Requirement already satisfied: python-docx in /www/server/panel/pyenv/lib/python3.7/site-packages (from docxtpl==0.16.7) (1.1.0) Requirement already satisfied: docxcompose in /www/server/panel/pyenv/lib/python3.7/site-packages (from docxtpl==0.16.7) (1.4.0) Requirement already satisfied: jinja2 in /www/server/panel/pyenv/lib/python3.7/site-packages (from docxtpl==0.16.7) (3.1.3) Requirement already satisfied: lxml in /www/server/panel/pyenv/lib/python3.7/site-packages (from docxtpl==0.16.7) (5.2.1) Requirement already satisfied: setuptools in /www/server/panel/pyenv/lib/python3.7/site-packages (from docxcompose->docxtpl==0.16.7) (65.5.0) Requirement already satisfied: babel in /www/server/panel/pyenv/lib/python3.7/site-packages (from docxcompose->docxtpl==0.16.7) (2.14.0) Requirement already satisfied: typing-extensions in /www/server/panel/pyenv/lib/python3.7/site-packages (from python-docx->docxtpl==0.16.7) (4.7.1) Requirement already satisfied: MarkupSafe>=2.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from jinja2->docxtpl==0.16.7) (2.1.5) Requirement already satisfied: pytz>=2015.7 in /www/server/panel/pyenv/lib/python3.7/site-packages (from babel->docxcompose->docxtpl==0.16.7) (2024.1) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: pymongo in /www/server/panel/pyenv/lib/python3.7/site-packages (4.6.3) Requirement already satisfied: dnspython<3.0.0,>=1.16.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from pymongo) (2.3.0) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: psycopg2-binary in /www/server/panel/pyenv/lib/python3.7/site-packages (2.9.9) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: flask in /www/server/panel/pyenv/lib/python3.7/site-packages (2.2.5) Requirement already satisfied: Werkzeug>=2.2.2 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask) (2.2.3) Requirement already satisfied: Jinja2>=3.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask) (3.1.3) Requirement already satisfied: itsdangerous>=2.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask) (2.1.2) Requirement already satisfied: click>=8.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask) (8.1.7) Requirement already satisfied: importlib-metadata>=3.6.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask) (6.7.0) Requirement already satisfied: zipp>=0.5 in /www/server/panel/pyenv/lib/python3.7/site-packages (from importlib-metadata>=3.6.0->flask) (3.15.0) Requirement already satisfied: typing-extensions>=3.6.4 in /www/server/panel/pyenv/lib/python3.7/site-packages (from importlib-metadata>=3.6.0->flask) (4.7.1) Requirement already satisfied: MarkupSafe>=2.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from Jinja2>=3.0->flask) (2.1.5) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: flask-sock in /www/server/panel/pyenv/lib/python3.7/site-packages (0.7.0) Requirement already satisfied: flask>=2 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask-sock) (2.2.5) Requirement already satisfied: simple-websocket>=0.5.1 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask-sock) (0.10.0) Requirement already satisfied: Werkzeug>=2.2.2 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask>=2->flask-sock) (2.2.3) Requirement already satisfied: Jinja2>=3.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask>=2->flask-sock) (3.1.3) Requirement already satisfied: itsdangerous>=2.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask>=2->flask-sock) (2.1.2) Requirement already satisfied: click>=8.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask>=2->flask-sock) (8.1.7) Requirement already satisfied: importlib-metadata>=3.6.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from flask>=2->flask-sock) (6.7.0) Requirement already satisfied: wsproto in /www/server/panel/pyenv/lib/python3.7/site-packages (from simple-websocket>=0.5.1->flask-sock) (1.2.0) Requirement already satisfied: zipp>=0.5 in /www/server/panel/pyenv/lib/python3.7/site-packages (from importlib-metadata>=3.6.0->flask>=2->flask-sock) (3.15.0) Requirement already satisfied: typing-extensions>=3.6.4 in /www/server/panel/pyenv/lib/python3.7/site-packages (from importlib-metadata>=3.6.0->flask>=2->flask-sock) (4.7.1) Requirement already satisfied: MarkupSafe>=2.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from Jinja2>=3.0->flask>=2->flask-sock) (2.1.5) Requirement already satisfied: h11<1,>=0.9.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from wsproto->simple-websocket>=0.5.1->flask-sock) (0.14.0) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Collecting gevent Downloading https://mirrors.tencent.com/pypi/packages/5b/02/22dad5a61fa2a5ae56e6d4869f5d70dc18df9a89dff2ffe50d8268aad4b0/gevent-22.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 9.6 MB/s eta 0:00:00 Collecting zope.event (from gevent) Downloading https://mirrors.tencent.com/pypi/packages/fe/42/f8dbc2b9ad59e927940325a22d6d3931d630c3644dae7e2369ef5d9ba230/zope.event-5.0-py3-none-any.whl (6.8 kB) Collecting zope.interface (from gevent) Downloading https://mirrors.tencent.com/pypi/packages/09/06/7c1202972bc99dd1b731c3c01157855cbc8d0944894c3b234473b1f4119c/zope.interface-6.4.post2.tar.gz (294 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 294.5/294.5 kB 8.1 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Collecting setuptools (from gevent) Downloading https://mirrors.tencent.com/pypi/packages/c7/42/be1c7bbdd83e1bfb160c94b9cafd8e25efc7400346cf7ccdbdb452c467fa/setuptools-68.0.0-py3-none-any.whl (804 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 804.0/804.0 kB 8.9 MB/s eta 0:00:00 Collecting greenlet>=2.0.0 (from gevent) Downloading https://mirrors.tencent.com/pypi/packages/fd/ac/a67e69bb4e3a9ae73ea88fa996f8cf1fc5609e0ca864e0c6f82ba42be70e/greenlet-3.1.1-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (562 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 563.0/563.0 kB 8.2 MB/s eta 0:00:00 Building wheels for collected packages: zope.interface Building wheel for zope.interface (setup.py) ... done Created wheel for zope.interface: filename=zope.interface-6.4.post2-cp37-cp37m-linux_x86_64.whl size=238253 sha256=38898bb69abdcf801a3f9ea3cf5f12f8931a2a6f36fffe989692eadee5867bb7 Stored in directory: /root/.cache/pip/wheels/61/b1/03/bdb0c69123389b3d6138e9cff90af5d2c4fefceb5d7c55f58d Successfully built zope.interface Installing collected packages: setuptools, greenlet, zope.interface, zope.event, gevent Successfully installed gevent-22.10.2 greenlet-3.0.3 setuptools-65.5.0 zope.event-5.0 zope.interface-6.3 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: simple-websocket==0.10.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (0.10.0) Requirement already satisfied: wsproto in /www/server/panel/pyenv/lib/python3.7/site-packages (from simple-websocket==0.10.0) (1.2.0) Requirement already satisfied: h11<1,>=0.9.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from wsproto->simple-websocket==0.10.0) (0.14.0) Requirement already satisfied: typing-extensions in /www/server/panel/pyenv/lib/python3.7/site-packages (from h11<1,>=0.9.0->wsproto->simple-websocket==0.10.0) (4.7.1) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: natsort in /www/server/panel/pyenv/lib/python3.7/site-packages (8.4.0) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: Skipping enum34 as it is not installed. WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: geoip2==4.7.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (4.7.0) Requirement already satisfied: aiohttp<4.0.0,>=3.6.2 in /www/server/panel/pyenv/lib/python3.7/site-packages (from geoip2==4.7.0) (3.8.6) Requirement already satisfied: maxminddb<3.0.0,>=2.3.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from geoip2==4.7.0) (2.4.0) Requirement already satisfied: requests<3.0.0,>=2.24.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from geoip2==4.7.0) (2.31.0) Requirement already satisfied: attrs>=17.3.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (23.2.0) Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (3.3.2) Requirement already satisfied: multidict<7.0,>=4.5 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (6.0.5) Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (4.0.3) Requirement already satisfied: yarl<2.0,>=1.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (1.9.4) Requirement already satisfied: frozenlist>=1.1.1 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (1.3.3) Requirement already satisfied: aiosignal>=1.1.2 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (1.3.1) Requirement already satisfied: asynctest==0.13.0 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (0.13.0) Requirement already satisfied: typing-extensions>=3.7.4 in /www/server/panel/pyenv/lib/python3.7/site-packages (from aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (4.7.1) Requirement already satisfied: idna<4,>=2.5 in /www/server/panel/pyenv/lib/python3.7/site-packages (from requests<3.0.0,>=2.24.0->geoip2==4.7.0) (3.7) Requirement already satisfied: urllib3<3,>=1.21.1 in /www/server/panel/pyenv/lib/python3.7/site-packages (from requests<3.0.0,>=2.24.0->geoip2==4.7.0) (1.25.11) Requirement already satisfied: certifi>=2017.4.17 in /www/server/panel/pyenv/lib/python3.7/site-packages (from requests<3.0.0,>=2.24.0->geoip2==4.7.0) (2024.2.2) Requirement already satisfied: importlib-metadata in /www/server/panel/pyenv/lib/python3.7/site-packages (from attrs>=17.3.0->aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (6.7.0) Requirement already satisfied: zipp>=0.5 in /www/server/panel/pyenv/lib/python3.7/site-packages (from importlib-metadata->attrs>=17.3.0->aiohttp<4.0.0,>=3.6.2->geoip2==4.7.0) (3.15.0) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: brotli in /www/server/panel/pyenv/lib/python3.7/site-packages (1.1.0) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Looking in indexes: https://mirrors.tencent.com/pypi/simple Requirement already satisfied: PyMySQL in /www/server/panel/pyenv/lib/python3.7/site-packages/PyMySQL-0.9.3-py3.7.egg (0.9.3) WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Starting Bt-Panel.... done Starting Bt-Tasks... done username: fdxyfajc Looking in indexes: https://mirrors.tencent.com/pypi/simple Collecting pyOpenSSl Downloading https://mirrors.tencent.com/pypi/packages/80/28/2659c02301b9500751f8d42f9a6632e1508aa5120de5e43042b8b30f8d5d/pyopenssl-25.1.0-py3-none-any.whl (56 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.8/56.8 kB 3.8 MB/s eta 0:00:00 Collecting cryptography<46,>=41.0.5 (from pyOpenSSl) Downloading https://mirrors.tencent.com/pypi/packages/05/2b/aaf0adb845d5dabb43480f18f7ca72e94f92c280aa983ddbd0bcd6ecd037/cryptography-45.0.5-cp37-abi3-manylinux_2_34_x86_64.whl (4.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 8.6 MB/s eta 0:00:00 Collecting cffi>=1.14 (from cryptography<46,>=41.0.5->pyOpenSSl) Downloading https://mirrors.tencent.com/pypi/packages/93/d0/2e2b27ea2f69b0ec9e481647822f8f77f5fc23faca2dd00d1ff009940eb7/cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (427 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 427.9/427.9 kB 4.7 MB/s eta 0:00:00 Collecting pycparser (from cffi>=1.14->cryptography<46,>=41.0.5->pyOpenSSl) Downloading https://mirrors.tencent.com/pypi/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 3.5 MB/s eta 0:00:00 Installing collected packages: pycparser, cffi, cryptography, pyOpenSSl Successfully installed cffi-1.15.1 cryptography-42.0.5 pyOpenSSl-24.1.0 pycparser-2.21 ======================================== 正在开启面板SSL,请稍等............ ======================================== 证书开启成功! ======================================== Stopping Bt-Tasks... done Stopping Bt-Panel... done Starting Bt-Panel.... done Starting Bt-Tasks... done cat: /etc/redhat-release: No such file or directory cat: /etc/redhat-release: No such file or directory Last metadata expiration check: 0:02:44 ago on Thu 03 Jul 2025 03:09:50 PM CST. Dependencies resolved. ============================================================================================================================================================================================================ Package Architecture Version Repository Size ============================================================================================================================================================================================================ Installing: firewalld noarch 1.2.6-3.oc9 BaseOS 451 k Upgrading: iptables-legacy x86_64 1.8.9-3.oc9 BaseOS 109 k iptables-legacy-libs x86_64 1.8.9-3.oc9 BaseOS 28 k iptables-libs x86_64 1.8.9-3.oc9 BaseOS 325 k Installing dependencies: firewalld-filesystem noarch 1.2.6-3.oc9 BaseOS 8.5 k gobject-introspection x86_64 1.76.1-8.oc9 BaseOS 247 k ipset x86_64 7.19-3.oc9 BaseOS 42 k ipset-libs x86_64 7.19-3.oc9 BaseOS 69 k iptables-nft x86_64 1.8.9-3.oc9 BaseOS 184 k libnftnl x86_64 1.2.6-4.oc9 BaseOS 80 k nftables x86_64 1.0.8-6.oc9 BaseOS 406 k python3-firewall noarch 1.2.6-3.oc9 BaseOS 157 k python3-gobject-base x86_64 3.46.0-3.oc9 BaseOS 191 k python3-gobject-base-noarch noarch 3.46.0-3.oc9 BaseOS 192 k python3-nftables x86_64 1.0.8-6.oc9 BaseOS 19 k Transaction Summary ============================================================================================================================================================================================================ Install 12 Packages Upgrade 3 Packages Total download size: 2.4 M Downloading Packages: (1/15): firewalld-filesystem-1.2.6-3.oc9.noarch.rpm 132 kB/s | 8.5 kB 00:00 (2/15): ipset-7.19-3.oc9.x86_64.rpm 416 kB/s | 42 kB 00:00 (3/15): gobject-introspection-1.76.1-8.oc9.x86_64.rpm 1.4 MB/s | 247 kB 00:00 (4/15): firewalld-1.2.6-3.oc9.noarch.rpm 1.9 MB/s | 451 kB 00:00 (5/15): ipset-libs-7.19-3.oc9.x86_64.rpm 568 kB/s | 69 kB 00:00 (6/15): iptables-nft-1.8.9-3.oc9.x86_64.rpm 1.2 MB/s | 184 kB 00:00 (7/15): libnftnl-1.2.6-4.oc9.x86_64.rpm 665 kB/s | 80 kB 00:00 (8/15): python3-firewall-1.2.6-3.oc9.noarch.rpm 1.1 MB/s | 157 kB 00:00 (9/15): nftables-1.0.8-6.oc9.x86_64.rpm 2.0 MB/s | 406 kB 00:00 (10/15): python3-gobject-base-3.46.0-3.oc9.x86_64.rpm 1.2 MB/s | 191 kB 00:00 (11/15): python3-nftables-1.0.8-6.oc9.x86_64.rpm 207 kB/s | 19 kB 00:00 (12/15): python3-gobject-base-noarch-3.46.0-3.oc9.noarch.rpm 1.4 MB/s | 192 kB 00:00 (13/15): iptables-legacy-1.8.9-3.oc9.x86_64.rpm 769 kB/s | 109 kB 00:00 (14/15): iptables-legacy-libs-1.8.9-3.oc9.x86_64.rpm 285 kB/s | 28 kB 00:00 (15/15): iptables-libs-1.8.9-3.oc9.x86_64.rpm 1.6 MB/s | 325 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 3.0 MB/s | 2.4 MB 00:00 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Running scriptlet: iptables-libs-1.8.9-3.oc9.x86_64 1/1 Upgrading : iptables-libs-1.8.9-3.oc9.x86_64 1/18 Installing : libnftnl-1.2.6-4.oc9.x86_64 2/18 Installing : iptables-nft-1.8.9-3.oc9.x86_64 3/18 Running scriptlet: iptables-nft-1.8.9-3.oc9.x86_64 3/18 Installing : nftables-1.0.8-6.oc9.x86_64 4/18 Running scriptlet: nftables-1.0.8-6.oc9.x86_64 4/18 Installing : python3-nftables-1.0.8-6.oc9.x86_64 5/18 Upgrading : iptables-legacy-libs-1.8.9-3.oc9.x86_64 6/18 Installing : ipset-libs-7.19-3.oc9.x86_64 7/18 Running scriptlet: ipset-libs-7.19-3.oc9.x86_64 7/18 Installing : ipset-7.19-3.oc9.x86_64 8/18 Installing : gobject-introspection-1.76.1-8.oc9.x86_64 9/18 Installing : python3-gobject-base-noarch-3.46.0-3.oc9.noarch 10/18 Installing : python3-gobject-base-3.46.0-3.oc9.x86_64 11/18 Installing : python3-firewall-1.2.6-3.oc9.noarch 12/18 Installing : firewalld-filesystem-1.2.6-3.oc9.noarch 13/18 Installing : firewalld-1.2.6-3.oc9.noarch 14/18 Running scriptlet: firewalld-1.2.6-3.oc9.noarch 14/18 Upgrading : iptables-legacy-1.8.9-3.oc9.x86_64 15/18 Running scriptlet: iptables-legacy-1.8.9-3.oc9.x86_64 15/18 Running scriptlet: iptables-legacy-1.8.9-1.oc9.x86_64 16/18 Cleanup : iptables-legacy-1.8.9-1.oc9.x86_64 16/18 Running scriptlet: iptables-legacy-1.8.9-1.oc9.x86_64 16/18 Cleanup : iptables-legacy-libs-1.8.9-1.oc9.x86_64 17/18 Cleanup : iptables-libs-1.8.9-1.oc9.x86_64 18/18 Running scriptlet: iptables-libs-1.8.9-1.oc9.x86_64 18/18 Verifying : firewalld-1.2.6-3.oc9.noarch 1/18 Verifying : firewalld-filesystem-1.2.6-3.oc9.noarch 2/18 Verifying : gobject-introspection-1.76.1-8.oc9.x86_64 3/18 Verifying : ipset-7.19-3.oc9.x86_64 4/18 Verifying : ipset-libs-7.19-3.oc9.x86_64 5/18 Verifying : iptables-nft-1.8.9-3.oc9.x86_64 6/18 Verifying : libnftnl-1.2.6-4.oc9.x86_64 7/18 Verifying : nftables-1.0.8-6.oc9.x86_64 8/18 Verifying : python3-firewall-1.2.6-3.oc9.noarch 9/18 Verifying : python3-gobject-base-3.46.0-3.oc9.x86_64 10/18 Verifying : python3-gobject-base-noarch-3.46.0-3.oc9.noarch 11/18 Verifying : python3-nftables-1.0.8-6.oc9.x86_64 12/18 Verifying : iptables-legacy-1.8.9-3.oc9.x86_64 13/18 Verifying : iptables-legacy-1.8.9-1.oc9.x86_64 14/18 Verifying : iptables-legacy-libs-1.8.9-3.oc9.x86_64 15/18 Verifying : iptables-legacy-libs-1.8.9-1.oc9.x86_64 16/18 Verifying : iptables-libs-1.8.9-3.oc9.x86_64 17/18 Verifying : iptables-libs-1.8.9-1.oc9.x86_64 18/18 Upgraded: iptables-legacy-1.8.9-3.oc9.x86_64 iptables-legacy-libs-1.8.9-3.oc9.x86_64 iptables-libs-1.8.9-3.oc9.x86_64 Installed: firewalld-1.2.6-3.oc9.noarch firewalld-filesystem-1.2.6-3.oc9.noarch gobject-introspection-1.76.1-8.oc9.x86_64 ipset-7.19-3.oc9.x86_64 ipset-libs-7.19-3.oc9.x86_64 iptables-nft-1.8.9-3.oc9.x86_64 libnftnl-1.2.6-4.oc9.x86_64 nftables-1.0.8-6.oc9.x86_64 python3-firewall-1.2.6-3.oc9.noarch python3-gobject-base-3.46.0-3.oc9.x86_64 python3-gobject-base-noarch-3.46.0-3.oc9.noarch python3-nftables-1.0.8-6.oc9.x86_64 Complete! Created symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service → /usr/lib/systemd/system/firewalld.service. Created symlink /etc/systemd/system/multi-user.target.wants/firewalld.service → /usr/lib/systemd/system/firewalld.service. success install.sh: line 1240: [: missing `]' True ================================================================== Congratulations! Installed successfully! =============注意:首次打开面板浏览器将提示不安全================= 请选择以下其中一种方式解决不安全提醒 1、下载证书,地址:https://dg2.bt.cn/ssl/baota_root.pfx,双击安装,密码【www.bt.cn】 2、点击【高级】-【继续访问】或【接受风险并继续】访问 教程:https://www.bt.cn/bbs/thread-117246-1-1.html mac用户请下载使用此证书:https://dg2.bt.cn/ssl/mac.crt ========================面板账户登录信息========================== 【云服务器】请在安全组放行 29178 端口 外网面板地址: https://101.35.44.242:29178/0244ecde 内网面板地址: https://10.0.12.17:29178/0244ecde username: fdxyfajc password: 545d3a9d 浏览器访问以下链接,添加宝塔客服 https://www.bt.cn/new/wechat_customer ================================================================== Time consumed: 2 Minute! [root@VM-12-17-opencloudos ~]#
最新发布
07-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值