Enhanced: use sing-box

This commit is contained in:
asskicker0214 2024-01-20 18:02:53 +08:00
parent a9ecbd2eb7
commit 4e5a6c5816
7 changed files with 158 additions and 29 deletions

View File

@ -3,4 +3,7 @@ docker run -d \
--network=host \
-v $(pwd)/frps.toml:/frps.toml \
fatedier/frps:v0.52.3 \
-c /frps.toml
-c /frps.toml \
--dashboard_port 7070 \
--dashboard_user homemade \
--dashboard_pwd "*IK<6yhn"

View File

@ -11,19 +11,18 @@
{
"type": "trojan",
"server": "out.homemade.net.cn",
"server_port": 6443,
"password": "J/f6m2X8-q4P",
"server_port": 4443,
"password": "*IK<6yhn",
"tls": {
"enabled": true,
"server_name": "out.homemade.net.cn",
"insecure": true,
"utls": {
"enabled": true,
"fingerprint": "chrome"
}
},
"multiplex": {
"enabled": false
"enabled": true
}
}
]

View File

@ -0,0 +1,27 @@
{
"inbounds": [
{
"type": "trojan",
"listen": "::",
"listen_port": 4443,
"users": [
{
"password": "*IK<6yhn"
}
],
"tls": {
"enabled": true,
"certificate_path": "/etc/letsencrypt/live/out.homemade.net.cn/fullchain.pem",
"key_path": "/etc/letsencrypt/live/out.homemade.net.cn/privkey.pem"
},
"multiplex": {
"enabled": true
}
}
],
"outbounds": [
{
"type": "direct"
}
]
}

View File

@ -26,16 +26,17 @@ services:
- shared_network
command: python3 -m http.server ${APP_PORT}
trojan:
image: teddysun/trojan-go:2023.11.18
sing-box:
image: ghcr.io/sagernet/sing-box
restart: unless-stopped
volumes:
- ./config.json:/etc/trojan-go/config.json
- ./config.json:/etc/sing-box/config.json
- cert_volume:/etc/letsencrypt
command: -D /var/lib/sing-box -C /etc/sing-box/ run
networks:
- shared_network
ports:
- 6443:6443
- 4443:4443
volumes:
cert_volume:

119
out/sing-box-server/log Normal file
View File

@ -0,0 +1,119 @@
2024-01-20 09:42:56,553:DEBUG:certbot._internal.main:certbot version: 2.7.4
2024-01-20 09:42:56,553:DEBUG:certbot._internal.main:Location of certbot entry point: /usr/local/bin/certbot
2024-01-20 09:42:56,553:DEBUG:certbot._internal.main:Arguments: ['--agree-tos', '-n', '-d', 'out.homemade.net.cn', '--webroot', '--webroot-path', '/www', '-m', 'asskicker0214@outlook.com']
2024-01-20 09:42:56,553:DEBUG:certbot._internal.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2024-01-20 09:42:56,575:DEBUG:certbot._internal.log:Root logging level set at 30
2024-01-20 09:42:56,576:DEBUG:certbot._internal.plugins.selection:Requested authenticator webroot and installer None
2024-01-20 09:42:56,577:DEBUG:certbot._internal.plugins.selection:Single candidate plugin: * webroot
Description: Saves the necessary validation files to a .well-known/acme-challenge/ directory within the nominated webroot path. A seperate HTTP server must be running and serving files from the webroot path. HTTP challenge only (wildcards not supported).
Interfaces: Authenticator, Plugin
Entry point: EntryPoint(name='webroot', value='certbot._internal.plugins.webroot:Authenticator', group='certbot.plugins')
Initialized: <certbot._internal.plugins.webroot.Authenticator object at 0x7f9a2e2e4fd0>
Prep: True
2024-01-20 09:42:56,577:DEBUG:certbot._internal.plugins.selection:Selected authenticator <certbot._internal.plugins.webroot.Authenticator object at 0x7f9a2e2e4fd0> and installer None
2024-01-20 09:42:56,577:INFO:certbot._internal.plugins.selection:Plugins selected: Authenticator webroot, Installer None
2024-01-20 09:42:56,691:DEBUG:certbot._internal.main:Picked account: <Account(RegistrationResource(body=Registration(key=None, contact=(), agreement=None, status=None, terms_of_service_agreed=None, only_return_existing=None, external_account_binding=None), uri='https://acme-v02.api.letsencrypt.org/acme/acct/1526233636', new_authzr_uri=None, terms_of_service=None), 10c8ddb4742ea7d9e6cfd0d89dd3587d, Meta(creation_dt=datetime.datetime(2024, 1, 20, 9, 39, 58, tzinfo=<UTC>), creation_host='79c3a714e96b', register_to_eff=None))>
2024-01-20 09:42:56,692:DEBUG:acme.client:Sending GET request to https://acme-v02.api.letsencrypt.org/directory.
2024-01-20 09:42:56,694:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org:443
2024-01-20 09:42:57,269:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "GET /directory HTTP/1.1" 200 752
2024-01-20 09:42:57,270:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Sat, 20 Jan 2024 09:42:57 GMT
Content-Type: application/json
Content-Length: 752
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
{
"keyChange": "https://acme-v02.api.letsencrypt.org/acme/key-change",
"meta": {
"caaIdentities": [
"letsencrypt.org"
],
"termsOfService": "https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf",
"website": "https://letsencrypt.org"
},
"newAccount": "https://acme-v02.api.letsencrypt.org/acme/new-acct",
"newNonce": "https://acme-v02.api.letsencrypt.org/acme/new-nonce",
"newOrder": "https://acme-v02.api.letsencrypt.org/acme/new-order",
"renewalInfo": "https://acme-v02.api.letsencrypt.org/draft-ietf-acme-ari-02/renewalInfo/",
"revokeCert": "https://acme-v02.api.letsencrypt.org/acme/revoke-cert",
"yjw1wpP2FA0": "https://community.letsencrypt.org/t/adding-random-entries-to-the-directory/33417"
}
2024-01-20 09:42:57,271:DEBUG:certbot._internal.display.obj:Notifying user: Requesting a certificate for out.homemade.net.cn
2024-01-20 09:42:57,278:DEBUG:acme.client:Requesting fresh nonce
2024-01-20 09:42:57,278:DEBUG:acme.client:Sending HEAD request to https://acme-v02.api.letsencrypt.org/acme/new-nonce.
2024-01-20 09:42:57,470:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "HEAD /acme/new-nonce HTTP/1.1" 200 0
2024-01-20 09:42:57,471:DEBUG:acme.client:Received response:
HTTP 200
Server: nginx
Date: Sat, 20 Jan 2024 09:42:57 GMT
Connection: keep-alive
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: tI90Q3sPfEx6TvH9TmopSuIsahgU5c8sYac0qKTGcBETxaJigsU
X-Frame-Options: DENY
Strict-Transport-Security: max-age=604800
2024-01-20 09:42:57,471:DEBUG:acme.client:Storing nonce: tI90Q3sPfEx6TvH9TmopSuIsahgU5c8sYac0qKTGcBETxaJigsU
2024-01-20 09:42:57,472:DEBUG:acme.client:JWS payload:
b'{\n "identifiers": [\n {\n "type": "dns",\n "value": "out.homemade.net.cn"\n }\n ]\n}'
2024-01-20 09:42:57,477:DEBUG:acme.client:Sending POST request to https://acme-v02.api.letsencrypt.org/acme/new-order:
{
"protected": "eyJhbGciOiAiUlMyNTYiLCAia2lkIjogImh0dHBzOi8vYWNtZS12MDIuYXBpLmxldHNlbmNyeXB0Lm9yZy9hY21lL2FjY3QvMTUyNjIzMzYzNiIsICJub25jZSI6ICJ0STkwUTNzUGZFeDZUdkg5VG1vcFN1SXNhaGdVNWM4c1lhYzBxS1RHY0JFVHhhSmlnc1UiLCAidXJsIjogImh0dHBzOi8vYWNtZS12MDIuYXBpLmxldHNlbmNyeXB0Lm9yZy9hY21lL25ldy1vcmRlciJ9",
"signature": "v7RsOwsUA6qpjooI39YJxVl44qLeaasaEUVv-muezaGNL7Wk6qpsj8Eb44OVNaet7kRG0u_h0igV0xRJz0tvqkBGqGWkDS7pOsVJiwgPH38aSyqxIdWiTEUYeJqrAKuBnBWyp1lOVS3O40utroA-OmRUSvquAh-a5j8TPDb3yuRy2XHY9vjjc8EVipxs3wJlOOQPnJ3zep3u1x0DphBsv4KorJOAMCfZOq__WrPZOiPNMSrjVRgPwn_jPg1aS79hLj9MUl7l5HT8UuTCpsWOf_vxKZe0HcaOvRoyQ_PXSKVYZxT7pYGX5YoJPmrwZv1yGINU8OA7hV4-6d8NV6BshA",
"payload": "ewogICJpZGVudGlmaWVycyI6IFsKICAgIHsKICAgICAgInR5cGUiOiAiZG5zIiwKICAgICAgInZhbHVlIjogIm91dC5ob21lbWFkZS5uZXQuY24iCiAgICB9CiAgXQp9"
}
2024-01-20 09:42:57,696:DEBUG:urllib3.connectionpool:https://acme-v02.api.letsencrypt.org:443 "POST /acme/new-order HTTP/1.1" 429 213
2024-01-20 09:42:57,697:DEBUG:acme.client:Received response:
HTTP 429
Server: nginx
Date: Sat, 20 Jan 2024 09:42:57 GMT
Content-Type: application/problem+json
Content-Length: 213
Connection: keep-alive
Boulder-Requester: 1526233636
Cache-Control: public, max-age=0, no-cache
Link: <https://acme-v02.api.letsencrypt.org/directory>;rel="index"
Replay-Nonce: tI90Q3sPmCK8SQY8K7634J_AnHvM4oiOkTYTLfM7ZtBLnX8R7YM
{
"type": "urn:ietf:params:acme:error:rateLimited",
"detail": "Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/",
"status": 429
}
2024-01-20 09:42:57,697:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/local/bin/certbot", line 33, in <module>
sys.exit(load_entry_point('certbot', 'console_scripts', 'certbot')())
File "/opt/certbot/src/certbot/certbot/main.py", line 19, in main
return internal_main.main(cli_args)
File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 1873, in main
return config.func(config, plugins)
File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 1600, in certonly
lineage = _get_and_save_cert(le_client, config, domains, certname, lineage)
File "/opt/certbot/src/certbot/certbot/_internal/main.py", line 143, in _get_and_save_cert
lineage = le_client.obtain_and_enroll_certificate(domains, certname)
File "/opt/certbot/src/certbot/certbot/_internal/client.py", line 517, in obtain_and_enroll_certificate
cert, chain, key, _ = self.obtain_certificate(domains)
File "/opt/certbot/src/certbot/certbot/_internal/client.py", line 428, in obtain_certificate
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subset_of_names)
File "/opt/certbot/src/certbot/certbot/_internal/client.py", line 478, in _get_order_and_authorizations
orderr = self.acme.new_order(csr_pem)
File "/opt/certbot/src/acme/acme/client.py", line 138, in new_order
response = self._post(self.directory['newOrder'], order)
File "/opt/certbot/src/acme/acme/client.py", line 366, in _post
return self.net.post(*args, **kwargs)
File "/opt/certbot/src/acme/acme/client.py", line 739, in post
return self._post_once(*args, **kwargs)
File "/opt/certbot/src/acme/acme/client.py", line 752, in _post_once
response = self._check_response(response, content_type=content_type)
File "/opt/certbot/src/acme/acme/client.py", line 603, in _check_response
raise messages.Error.from_json(jobj)
acme.messages.Error: urn:ietf:params:acme:error:rateLimited :: There were too many requests of a given type :: Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/
2024-01-20 09:42:57,700:ERROR:certbot._internal.log:An unexpected error occurred:
2024-01-20 09:42:57,701:ERROR:certbot._internal.log:Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/

View File

@ -1,20 +0,0 @@
{
"run_type": "server",
"local_addr": "0.0.0.0",
"local_port": 6443,
"remote_addr": "app",
"remote_port": 6080,
"password": [
"J/f6m2X8-q4P"
],
"ssl": {
"cert": "/etc/letsencrypt/live/out.homemade.net.cn/fullchain.pem",
"key": "/etc/letsencrypt/live/out.homemade.net.cn/privkey.pem",
"fallback_addr": "app",
"fallback_port": 6080
},
"websocket": {
"enabled": true,
"path": "/trojan"
}
}