用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/HashLoad/horse --skill horse-ssl-tls命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | horse-ssl-tls |
| description | Guide to enabling SSL/TLS, configuring HTTPS, handling certificates, and securing transport layers. |
In production environments, always encrypt data in transit using SSL/TLS. Depending on the transport provider you select, the configuration for HTTPS differs.
When using the native Horse.Provider.HTTPsys provider on Windows, the SSL handshake is handled entirely by the operating system kernel.
You do not configure certificates inside your Delphi code. Instead, bind your SSL certificate (using its thumbprint) to the target port using the Windows command line tool netsh (requires Administrator privileges):
netsh http add sslcert ipport=0.0.0.0:443 certhash=YOUR_CERT_THUMBPRINT appid={YOUR-APP-GUID}
Just start the Horse server normally. HTTP.sys will route HTTPS traffic on the bound port to your application automatically:
program SecureAPI;
{$APPTYPE CONSOLE}
uses
Horse,
Horse.Provider.HTTPsys;
begin
THorse.Get('/ping',
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
begin
Res.Send('pong');
end);
// Starts the server. HTTP.sys routes both HTTP/HTTPS automatically depending on OS bindings.
THorse.Listen(443);
end.
The horse-provider-ics provider handles OpenSSL 1.1.1 / 3.x / 4.x directly within the application process.
Load your certificate .pem or .crt files and private key files during initialization:
uses
Horse,
Horse.Provider.ICS;
begin
// Set up SSL certificate paths and properties fluently
THorse.Provider.ICS.SSLSecured := True;
THorse.Provider.ICS.SSLCertFile := 'C:\certs\server.crt';
THorse.Provider.ICS.SSLPrivateKeyFile := 'C:\certs\server.key';
THorse.Provider.ICS.SSLPassword := 'my_private_key_password';
// Optionally enable Server-side Mutual TLS (mTLS)
THorse.Provider.ICS.SSLVerifyPeer := True;
THorse.Provider.ICS.SSLCACertFile := 'C:\certs\ca.crt'; // CA certificate to verify clients
THorse.Get('/ping',
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
begin
Res.Send('pong');
end);
THorse.Listen(8443);
end.
For the async CrossSocket provider, configure the TLS context in your server instance:
uses
Horse,
Horse.Provider.CrossSocket;
begin
// Enable SSL/TLS and load certificates (requires OpenSSL library binaries on PATH)
THorse.Provider.CrossSocket.SSLSecured := True;
THorse.Provider.CrossSocket.SSLCertFile := 'C:\certs\server.crt';
THorse.Provider.CrossSocket.SSLPrivateKeyFile := 'C:\certs\server.key';
THorse.Listen(8443);
end.
Strict-Transport-Security header to response headers to force browsers to connect only via HTTPS.443.Diretrizes e workflows para desenvolvimento e manutenção de transmissões de dados em tempo real (Web Streams e Server-Sent Events - SSE) no framework Horse.
Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.
Guidelines and workflows for developing and maintaining WebSocket endpoints and protocol upgrades within the Horse framework.
基于 SOC 职业分类