Are you an LLM? You can read better optimized documentation at /config/outbounds/blackhole.md for this page in Markdown format
Blackhole
Blackhole(黑洞)是一个出站数据协议,它会阻碍所有数据的出站,配合 路由配置 一起使用,可以达到禁止访问某些网站的效果。
OutboundConfigurationObject
json
{
"response": {
"type": "none"
}
}1
2
3
4
5
2
3
4
5
response: ResponseObject
配置黑洞的响应数据。
Blackhole 会在收到待转发数据之后,发送指定的响应数据,然后关闭连接,待转发的数据将被丢弃。 如不指定此项,Blackhole 将直接关闭连接。
ResponseObject
json
{
"type": "none"
}1
2
3
2
3
type: "http" | "none"
当 type 为 "none"(默认值)时,Blackhole 将直接关闭连接。
当 type 为 "http" 时,Blackhole 会发回一个简单的 HTTP 403 数据包,然后关闭连接。
扩展类型(本地)
本地版本支持更多响应类型:
http-XXX:返回自定义 HTTP 状态码,如http-200/http-301/http-404tls:发送 TLS Alert(默认handshake_failure)tls-XX:发送指定 TLS Alert 码,如tls-40/tls-70
常见 TLS Alert 码:
40:handshake_failure70:protocol_version80:internal_error112:unrecognized_name116:certificate_required
示例:
json
{
"response": {
"type": "http-451"
}
}1
2
3
4
5
2
3
4
5
json
{
"response": {
"type": "tls-70"
}
}1
2
3
4
5
2
3
4
5