feat: add mcp-servers/**

This commit is contained in:
Sun-ZhenXing
2025-10-23 09:08:07 +08:00
parent ece59b42bf
commit f603ed5db9
57 changed files with 3061 additions and 95 deletions

9
src/dnsmasq/.env.example Normal file
View File

@@ -0,0 +1,9 @@
# DNSMasq version
DNSMASQ_VERSION=2.91
# DNS port (default: 53)
# Note: Ports below 1024 require NET_BIND_SERVICE capability
DNSMASQ_DNS_PORT_OVERRIDE=53
# Timezone
TZ=UTC

49
src/dnsmasq/README.md Normal file
View File

@@ -0,0 +1,49 @@
# DNSMasq
[English](./README.md) | [中文](./README.zh.md)
This service deploys DNSMasq, a lightweight DNS forwarder and DHCP server.
## Services
- `dnsmasq`: The DNSMasq service.
## Environment Variables
| Variable Name | Description | Default Value |
| ------------------------- | ---------------------------------------------------- | ------------- |
| DNSMASQ_VERSION | DNSMasq image version | `2.91` |
| DNSMASQ_DNS_PORT_OVERRIDE | Host port mapping (maps to DNS port 53 in container) | 53 |
| TZ | Timezone setting | `UTC` |
Please modify the `.env` file as needed for your use case.
## Configuration
### Configure LAN DNS Resolution
Lines starting with `address` in the `dnsmasq.conf` file will be parsed as LAN DNS resolution rules.
```conf
address=/example.com/192.168.1.123
```
Router Configuration:
- Set the gateway to the router IP
- Bind the server IP address and MAC address, or assign a static IP address
- Configure the DHCP server to use the server IP address as the DNS server
## Volumes
- `dnsmasq.conf`: Configuration file for DNSMasq (mounted to `/etc/dnsmasq.conf`).
## Ports
- `53/tcp`: DNS service (TCP)
- `53/udp`: DNS service (UDP)
## Security Notes
- This service requires `NET_ADMIN` and `NET_BIND_SERVICE` capabilities to bind to privileged ports.
- Ensure proper firewall rules are in place to restrict access to the DNS service.

13
src/dnsmasq/README.zh.md Normal file
View File

@@ -0,0 +1,13 @@
# 配置局域网 DNS 解析
`dnsmasq.conf` 文件中以 `address` 开头的行会被解析为局域网 DNS 解析。
```conf
address=/example.com/192.168.1.123
```
在路由器中设置:
- 网关为路由器 IP
- 服务器 IP 地址和 MAC 地址绑定,或给定固定 IP 地址
- DHCP 服务器设置 DNS 服务器为服务器 IP 地址

2
src/dnsmasq/dnsmasq.conf Normal file
View File

@@ -0,0 +1,2 @@
interface=*
server=8.8.8.8

View File

@@ -0,0 +1,38 @@
x-default: &default
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
services:
dnsmasq:
<<: *default
image: dockurr/dnsmasq:${DNSMASQ_VERSION:-2.91}
volumes:
- ./dnsmasq.conf:/etc/dnsmasq.conf:ro
ports:
- "${DNSMASQ_DNS_PORT_OVERRIDE:-53}:53/udp"
- "${DNSMASQ_DNS_PORT_OVERRIDE:-53}:53/tcp"
environment:
- TZ=${TZ:-UTC}
cap_drop:
- ALL
cap_add:
- NET_ADMIN
- NET_BIND_SERVICE
healthcheck:
test: ["CMD", "nslookup", "-timeout=1", "localhost", "127.0.0.1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '0.50'
memory: 128M
reservations:
cpus: '0.10'
memory: 32M