Skip to content

Commit ed8fc43

Browse files
committed
fix(ci): gofumpt formatting, add entrypoint/env to compose.dev.yml
1 parent 6cb9c9a commit ed8fc43

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

compose.dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,16 @@ services:
5151
restart: unless-stopped
5252
container_name: openclaw
5353
network_mode: "service:tun2proxy"
54+
entrypoint: ["/bin/sh", "-c", "[ -f \"$HOME/.openclaw/.env\" ] && set -a && . \"$HOME/.openclaw/.env\" && set +a; exec docker-entrypoint.sh node openclaw.mjs gateway --allow-unconfigured"]
5455
environment:
5556
- HOME=/home/node
5657
- OPENCLAW_GATEWAY_TOKEN=${OPENCLAW_GATEWAY_TOKEN:-}
5758
- SSL_CERT_FILE=/usr/local/share/ca-certificates/sluice/sluice-ca.crt
5859
- REQUESTS_CA_BUNDLE=/usr/local/share/ca-certificates/sluice/sluice-ca.crt
5960
- NODE_EXTRA_CA_CERTS=/usr/local/share/ca-certificates/sluice/sluice-ca.crt
61+
- NPM_CONFIG_PREFIX=/home/node/.npm-global
62+
- PATH=/home/node/.npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
63+
- NODE_COMPILE_CACHE=/home/node/.node-compile-cache
6064
volumes:
6165
- openclaw-home:/home/node
6266
- sluice-ca:/usr/local/share/ca-certificates/sluice:ro

internal/proxy/sni_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ func buildClientHello(hostname string) []byte {
4949

5050
// ClientHello body: version(2) + random(32) + sessionID(1) + cipherSuites(4) + compression(2) + extensions
5151
chBody := make([]byte, 0, 2+32+1+4+2+2+extsLen)
52-
chBody = append(chBody, 0x03, 0x03) // TLS 1.2
52+
chBody = append(chBody, 0x03, 0x03) // TLS 1.2
5353
chBody = append(chBody, make([]byte, 32)...) // random
54-
chBody = append(chBody, 0) // session ID length = 0
55-
chBody = append(chBody, 0, 2, 0x00, 0xFF) // cipher suites: length=2, one suite
56-
chBody = append(chBody, 1, 0) // compression: length=1, null
54+
chBody = append(chBody, 0) // session ID length = 0
55+
chBody = append(chBody, 0, 2, 0x00, 0xFF) // cipher suites: length=2, one suite
56+
chBody = append(chBody, 1, 0) // compression: length=1, null
5757
chBody = append(chBody, byte(extsLen>>8), byte(extsLen))
5858
chBody = append(chBody, ext...)
5959

@@ -67,8 +67,8 @@ func buildClientHello(hostname string) []byte {
6767
// TLS record: type=Handshake(0x16), version(2), length(2), handshake
6868
recLen := len(hs)
6969
record := make([]byte, 0, 5+recLen)
70-
record = append(record, 0x16) // Handshake
71-
record = append(record, 0x03, 0x01) // TLS 1.0 record version
70+
record = append(record, 0x16) // Handshake
71+
record = append(record, 0x03, 0x01) // TLS 1.0 record version
7272
record = append(record, byte(recLen>>8), byte(recLen))
7373
record = append(record, hs...)
7474

0 commit comments

Comments
 (0)