mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-05-13 05:52:04 +00:00
Fix on macOS (#1539)
This commit is contained in:
parent
6556d7e595
commit
9bb9729279
3 changed files with 14 additions and 13 deletions
16
package-lock.json
generated
16
package-lock.json
generated
|
|
@ -1015,7 +1015,7 @@
|
|||
"ts-api-utils": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
@ -1059,7 +1059,7 @@
|
|||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
@ -1084,7 +1084,7 @@
|
|||
"@typescript-eslint/visitor-keys": "7.7.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
@ -1103,7 +1103,7 @@
|
|||
"ts-api-utils": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
@ -1124,7 +1124,7 @@
|
|||
"integrity": "sha512-G01YPZ1Bd2hn+KPpIbrAhEWOn5lQBrjxkzHkWvP6NucMXFtfXoevK82hzQdpfuQYuhkvFDeQYbzXCjR1z9Z03w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
@ -1147,7 +1147,7 @@
|
|||
"ts-api-utils": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
@ -1213,7 +1213,7 @@
|
|||
"semver": "^7.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
@ -1248,7 +1248,7 @@
|
|||
"eslint-visitor-keys": "^3.4.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || >=20.0.0"
|
||||
"node": "^18.16.0 || >=20.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
|
|
|||
|
|
@ -159,6 +159,7 @@ tasks:
|
|||
desc: Run the integration test
|
||||
cmds:
|
||||
- task: docker:build
|
||||
vars: {TARGET_ARCH: {sh: 'uname -m'}}
|
||||
- task: test_image
|
||||
vars:
|
||||
IMAGE_NAME: localhost/outline/shadowbox:latest
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ function cleanup() {
|
|||
setup
|
||||
|
||||
# Wait for target to come up.
|
||||
wait_for_resource 127.0.0.1:10080
|
||||
wait_for_resource localhost:10080
|
||||
TARGET_IP="$("${DOCKER}" inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${TARGET_CONTAINER}")"
|
||||
readonly TARGET_IP
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ function cleanup() {
|
|||
fail "Client should not have access to target host") || (($? == 6 || $? == 28))
|
||||
|
||||
# Wait for shadowbox to come up.
|
||||
wait_for_resource https://127.0.0.1:20443/access-keys
|
||||
wait_for_resource https://localhost:20443/access-keys
|
||||
# Verify that the shadowbox can access the target
|
||||
"${DOCKER}" exec "${SHADOWBOX_CONTAINER}" wget --spider http://target
|
||||
|
||||
|
|
@ -213,17 +213,17 @@ function cleanup() {
|
|||
function test_networking() {
|
||||
# Verify the server blocks requests to hosts on private addresses.
|
||||
# Exit code 52 is "Empty server response".
|
||||
(client_curl -x "socks5h://127.0.0.1:${LOCAL_SOCKS_PORT}" "${TARGET_IP}" \
|
||||
(client_curl -x "socks5h://localhost:${LOCAL_SOCKS_PORT}" "${TARGET_IP}" \
|
||||
&& fail "Target host in a private network accessible through shadowbox") || (($? == 52))
|
||||
|
||||
# Verify we can retrieve the internet target URL.
|
||||
client_curl -x "socks5h://127.0.0.1:${LOCAL_SOCKS_PORT}" "${INTERNET_TARGET_URL}" \
|
||||
client_curl -x "socks5h://localhost:${LOCAL_SOCKS_PORT}" "${INTERNET_TARGET_URL}" \
|
||||
|| fail "Could not fetch ${INTERNET_TARGET_URL} through shadowbox."
|
||||
|
||||
# Verify we can't access the URL anymore after the key is deleted
|
||||
client_curl --insecure -X DELETE "${SB_API_URL}/access-keys/0" > /dev/null
|
||||
# Exit code 56 is "Connection reset by peer".
|
||||
(client_curl -x "socks5h://127.0.0.1:${LOCAL_SOCKS_PORT}" "${INTERNET_TARGET_URL}" &> /dev/null \
|
||||
(client_curl -x "socks5h://localhost:${LOCAL_SOCKS_PORT}" "${INTERNET_TARGET_URL}" &> /dev/null \
|
||||
&& fail "Deleted access key is still active") || (($? == 56))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue