Skip to content

Plugins zh HK

ArchiBot edited this page Nov 23, 2025 · 34 revisions

ๅค–ๆŽ›็จ‹ๅผ

ASF includes support for custom plugins that can be loaded during runtime. ๅค–ๆŽ›็จ‹ๅผๅ…่จฑๆ‚จ้€š้ŽๆทปๅŠ ่‡ช่จ‚ๅ‘ฝไปคใ€่‡ช่จ‚ไบคๆ˜“้‚่ผฏๆˆ–่ˆ‡็ฌฌไธ‰ๆ–นๅทฅๅ…ทๅ’Œ API็š„ๆ•ด้ซ”้›†ๆˆ่‡ช่จ‚ASF่กŒ็‚บใ€‚

This page describes ASF plugins from users perspective - explanation, usage and likewise. If you want to view developer's perspective, move here instead.


ไฝฟ็”จๆ–นๆณ•

ASFๅพžไฝๆ–ผASF่ณ‡ๆ–™ๅคพไธญ็š„plugins็›ฎ้Œ„ไธญ่ผ‰ๅ…ฅๅค–ๆŽ›็จ‹ๅผใ€‚ It's a recommended practice (which becomes mandatory with plugin auto-updates) to maintain a dedicated directory for each plugin that you want to use, which can be based off its name, such as MyPlugin. ้€™ๆจฃๅšๅฐ‡็”Ÿๆˆ plugins/MyPlugin ็š„ๆœ€็ต‚ๆจน็ตๆง‹ใ€‚ ๆœ€ๅพŒ๏ผŒๅค–ๆŽ›็จ‹ๅผ็š„ๆ‰€ๆœ‰ไบŒ้€ฒไฝๆช”ๆกˆ้ƒฝๆ‡‰่ฉฒๆ”พๅœจ้‚ฃๅ€‹ๅฐˆ็”จ่ณ‡ๆ–™ๅคพ่ฃ๏ผŒASF ๆœƒๅœจ้‡ๆ–ฐ้–‹ๆฉŸๅพŒๆˆๅŠŸๅตๆธฌไธฆไฝฟ็”จๆ‚จ็š„ๅค–ๆŽ›็จ‹ๅผใ€‚

Usually plugin developers will publish their plugins in form of a zip file with binaries inside, which means that you should unpack that zip file to its own dedicated subdirectory inside plugins directory.

ๅฆ‚ๆžœๅค–ๆŽ›็จ‹ๅผๅทฒๆˆๅŠŸ่ผ‰ๅ…ฅ๏ผŒๆ‚จๅฐ‡ๅœจๆ—ฅ่ชŒไธญ็œ‹ๅˆฐๅฎƒ็š„ๅ็จฑๅ’Œ็‰ˆๆœฌใ€‚ ๅœจ้‡ๅˆฐ่ˆ‡ๆ‚จๆฑบๅฎšไฝฟ็”จ็š„ๅค–ๆŽ›็จ‹ๅผ็›ธ้—œ็š„้Œฏ่ชคๆˆ–็”จๆณ•ๅ•้กŒๆ™‚๏ผŒๆ‚จๆ‡‰่ฉฒ่ซฎ่ฉข็›ธ้—œๅค–ๆŽ›็จ‹ๅผ้–‹็™ผไบบๅ“กใ€‚

ๆ‚จๅฏไปฅๅœจๆˆ‘ๅ€‘็š„**็ฌฌไธ‰ๆ–นๅทฅๅ…ท**้ƒจๅˆ†ๆ‰พๅˆฐไธ€ไบ›็‰น่‰ฒๅค–ๆŽ›็จ‹ๅผใ€‚

Please note that ASF plugins could be malicious. You should always ensure that you're using plugins made by developers that you can trust, even those from the third-party section above. ๅฆ‚ๆžœๆ‚จๆฑบๅฎšไฝฟ็”จไปปไฝ•่‡ช่จ‚ๅค–ๆŽ›็จ‹ๅผ๏ผŒASF ้–‹็™ผไบบๅ“กๅฐ‡็„กๆณ•ๅ†ไฟ่ญ‰ๆ‚จ้€šๅธธ็š„ ASF ๅ„ชๅ‹ข๏ผˆๅฆ‚็ต•็„กๆƒกๆ„่ปŸไปถๆˆ–้ฟๅ…VAC๏ผ‰ใ€‚ You need to understand that plugins have full control over ASF process once loaded, due to that we're also unable to support setups that utilize custom plugins, since you're no longer running vanilla ASF code.


ๅ…ผๅฎนๆ€ง

Depending on plugin's complexity, scope and a lot of other factors, it's entirely possible that it'll require from you to use generic ASF variant, instead of usually recommended OS-specific. This is because OS-specific variant comes only with core functionality required for ASF itself, and your plugin may require parts that fall outside of main ASF scope, in result being incompatible with trimmed OS-specific builds.

In general, when using third-party plugins, we recommend using ASF generic variant for maximum compatibility. However, not all plugins may require it - please refer to your plugin's information in order to find out whether you need to use generic ASF variant or not.


Automatic updates

ASF has built-in mechanism for plugins auto-updates. For that feature to work, first of all, your plugin of choice needs to support that mechanism. If you've loaded a plugin that supports auto-updates, ASF will state it in the log appropriately during plugin initialization, such as "plugin has been disabled from automatic updates" or "plugin has been registered and enabled for automatic updates".

By default, automatic updates for custom plugins are disabled, due to security reasons. You can configure automatic updates in the config by using PluginsUpdateList and/or PluginsUpdateMode, we recommend to read description of those config properties for more info. It's also nice to note that, like with ASF updates, you can decide to keep automatic updates disabled, and then update on as-needed, manual basis, by issuing updateplugins command.

Both approaches allow you to update none, some, or all custom plugins that you've loaded into the process.

Clone this wiki locally