스크린샷은 영어 화면을 사용하며 다이어그램은 가이드 언어를 따릅니다. 앱에서 선택한 언어에 따라 컨트롤 이름이 다를 수 있습니다.
AppleScript — 명령어 참조
Mac 앱 자동화 화면과 같은 명령 설명 및 복사 가능한 예제입니다. 기존 명령과 2.0.17에서 추가된 명령을 포함합니다.

Mac 앱 내장 자료에서 명령별 설명과 전체 스크립트를 동기화합니다. 실행 전에 예제 이름과 ID를 바꾸세요. 실제 연결과 설정을 변경할 수 있으므로 전체 페이지를 한 번에 실행하지 마세요.
명령어 참조
여기에 표시된 명령 구문을 사용하세요. 연결 이름이나 그룹 태그는 따옴표로 묶습니다.
start
창을 표시하지 않고 Secure Pipes를 시작합니다.
tell application "Secure Pipes" to start
show
Secure Pipes 창을 표시합니다.
tell application "Secure Pipes" to show
hide
창을 숨기며 Secure Pipes와 연결은 계속 실행됩니다.
tell application "Secure Pipes" to hide
shutdown
Secure Pipes를 종료하고 활성 연결을 중지합니다.
tell application "Secure Pipes" to shutdown
list connections
저장된 연결을 나열합니다.
tell application "Secure Pipes" to list connections
list connection groups
연결 그룹으로 사용되는 태그를 나열합니다.
tell application "Secure Pipes" to list connection groups
connect connection "Build Tunnel (Local Forward)"
저장된 연결을 시작합니다.
tell application "Secure Pipes" to connect connection "Build Tunnel (Local Forward)"
disconnect connection "Build Tunnel (Local Forward)"
저장된 연결을 중지합니다.
tell application "Secure Pipes" to disconnect connection "Build Tunnel (Local Forward)"
connection status "Build Tunnel (Local Forward)"
현재 연결 상태를 확인합니다.
tell application "Secure Pipes" to connection status "Build Tunnel (Local Forward)"
connect group "engineering"
저장된 시작 설정에 따라 그룹을 시작합니다.
tell application "Secure Pipes" to connect group "engineering"
disconnect group "engineering"
그룹과 구성원 연결을 중지합니다.
tell application "Secure Pipes" to disconnect group "engineering"
스크립트에는 이름을 바꿔도 유지되는 연결 UUID를 권장합니다. 고유한 이름이나 유형이 포함된 전체 이름도 사용할 수 있습니다. 이름이 중복되면 UUID를 사용하세요.
원격 데스크톱
list remote desktops
저장된 RDP/VNC 연결을 나열합니다.
tell application "Secure Pipes" to list remote desktops
get remote desktop "<ID>"
ID로 연결을 읽습니다. 자격 증명은 반환하지 않습니다.
tell application "Secure Pipes" to get remote desktop "DESKTOP-ID"
create remote desktop <JSON>
name과 values로 연결을 생성합니다. 사전 설정 호스트는 hostProfileUUID로 지정합니다.
tell application "Secure Pipes" to create remote desktop "{\"name\":\"Office desktop\",\"values\":{\"hostProfileUUID\":\"PRESET-HOST-ID\",\"remoteDesktopType\":\"rdp\",\"remoteDesktopUsername\":\"alice\",\"remoteHost\":\"192.168.1.91\"}}"
tell application "Secure Pipes" to create remote desktop "{\"name\":\"Office VNC\",\"values\":{\"hostProfileUUID\":\"PRESET-HOST-ID\",\"remoteDesktopType\":\"vnc\",\"remoteDesktopVNCOpenMode\":\"screenSharing\"}}"
update remote desktop <JSON>
id로 업데이트합니다. name과 values는 선택 사항입니다.
tell application "Secure Pipes" to update remote desktop "{\"id\":\"DESKTOP-ID\",\"values\":{\"remoteDesktopOptions\":{\"screen mode id\":1,\"audiomode\":2}}}"
open remote desktop "<ID>"
필요하면 SSH 터널을 시작한 후 설정된 RDP/VNC 클라이언트를 엽니다.
tell application "Secure Pipes" to open remote desktop "DESKTOP-ID"
delete remote desktop "<ID>"
ID로 연결이 끊긴 프로필을 삭제합니다.
tell application "Secure Pipes" to delete remote desktop "DESKTOP-ID"
사용자 이름을 쓸 수 있지만 저장된 사용자 이름은 반환하지 않습니다. SSH 비밀번호와 인증 파일은 Secure Pipes에서 설정하고 데스크톱 비밀번호는 클라이언트에서 입력하세요.
작업 계획
예약 작업을 생성·제어합니다. 읽기 결과는 암호나 개인 키 내용을 반환하지 않습니다.
list task plans
민감 정보를 제거한 JSON으로 계획을 나열합니다.
tell application "Secure Pipes" to list task plans
get task plan "work-start"
ID로 민감 정보를 제거한 계획 JSON을 읽습니다.
tell application "Secure Pipes" to get task plan "work-start"
create task plan <JSON>
검증된 계획을 만듭니다. 작업에 연결/그룹 ID를 쓰고 자격 증명은 넣지 않습니다.
tell application "Secure Pipes"
create task plan "{\"id\":\"work-start\",\"hour\":9,\"minute\":0,\"repeat\":2,\"actions\":[{\"type\":\"start_group\",\"id\":\"work\"}]}"
end tell
update task plan <JSON>
기존 ID와 바꿀 필드로 계획을 갱신합니다.
tell application "Secure Pipes"
update task plan "{\"id\":\"work-start\",\"hour\":8,\"minute\":45,\"repeat\":2,\"actions\":[{\"type\":\"start_group\",\"id\":\"work\"}]}"
end tell
set task plan enabled "work-start"
일정 변경 없이 활성/비활성화합니다. 매개변수 기본값은 true입니다.
tell application "Secure Pipes" to set task plan enabled "work-start" enabled false
tell application "Secure Pipes" to set task plan enabled "work-start" enabled true
run task plan "work-start"
저장된 계획을 즉시 실행하고 JSON 결과를 반환합니다.
tell application "Secure Pipes" to run task plan "work-start"
delete task plan "work-start"
ID로 저장된 계획을 삭제합니다.
tell application "Secure Pipes" to delete task plan "work-start"
JSON은 repeat 0–6, 사용자 요일, ISO 8601 또는 YYYY-MM-DD 날짜 범위와 검증된 작업을 지원합니다. 먼저 list connections와 list connection groups로 ID를 얻으세요.
규칙과 사용 시나리오
규칙을 변경하거나 시나리오를 전환할 때 ID 또는 고유한 이름을 사용하세요. 시나리오를 전환하면 활성 연결을 끊은 뒤 다시 연결합니다. 시나리오를 삭제해도 규칙은 유지되며, 다른 시나리오에 속하지 않은 규칙은 공통 규칙이 됩니다.
list proxy rules
규칙을 순서대로 ID, 이름, 활성화 상태, 동작, 시나리오 ID와 함께 나열합니다.
tell application "Secure Pipes" to list proxy rules
list scenarios
공통 시나리오를 포함하여 시나리오의 ID, 이름, 사용 상태를 나열합니다.
tell application "Secure Pipes" to list scenarios
current scenario
현재 사용 중인 시나리오 이름을 표시합니다.
tell application "Secure Pipes" to current scenario
switch scenario "Office"
ID 또는 고유 이름으로 시나리오를 전환하고 영향을 받는 연결을 선택한 규칙으로 다시 연결합니다.
tell application "Secure Pipes" to switch scenario "Office"
enable proxy rule "Work websites"
ID 또는 고유 이름으로 규칙을 활성화합니다.
tell application "Secure Pipes" to enable proxy rule "Work websites"
disable proxy rule "Work websites"
규칙을 삭제하지 않고 비활성화합니다.
tell application "Secure Pipes" to disable proxy rule "Work websites"
set rule scenarios "Work websites" scenarios {"Office", "Travel"}
규칙의 시나리오 지정을 교체합니다. Universal을 지정하면 공통 규칙이 됩니다.
tell application "Secure Pipes" to set rule scenarios "Work websites" scenarios {"Office", "Travel"}
create scenario "Travel"
고유한 이름으로 시나리오를 만들고 ID를 반환합니다.
tell application "Secure Pipes" to create scenario "Travel"
rename scenario "Travel" to "Mobile work"
규칙 지정을 유지하면서 시나리오 이름을 변경합니다.
tell application "Secure Pipes" to rename scenario "Travel" to "Mobile work"
delete scenario "Travel"
규칙은 유지하고 시나리오를 삭제합니다. 다른 시나리오에 속하지 않는 규칙은 공통 규칙이 됩니다.
tell application "Secure Pipes" to delete scenario "Travel"
종합 예제
tell application "Secure Pipes"
set savedRules to list proxy rules
set savedScenarios to list scenarios
set selectedScenario to current scenario
switch scenario "Office"
enable proxy rule "Work websites"
disable proxy rule "Work websites"
set rule scenarios "Work websites" scenarios {"Office", "Travel"}
set rule scenarios "Work websites" scenarios {}
set newScenarioID to create scenario "Travel"
rename scenario newScenarioID to "Mobile work"
delete scenario newScenarioID
end tell
프록시 및 네트워크 공유
공유는 저장된 주소, 포트 및 인증 설정을 사용합니다. 필요한 경우 기존 확인 창이 열립니다. 게이트웨이 모드에는 위험 확인과 macOS 승인이 필요합니다.
list proxy servers
설정된 프록시 서버의 ID, 이름, 유형, 주소를 나열합니다. 인증 정보는 포함하지 않습니다.
tell application "Secure Pipes" to list proxy servers
transparent proxy status
투명 프록시 실행 상태, 시스템 확장 상태 및 버전 일치 여부를 표시합니다.
tell application "Secure Pipes" to transparent proxy status
initialize transparent proxy
시스템 확장을 설치하거나 복구합니다. macOS 승인이 필요할 수 있으며 투명 프록시는 시작하지 않습니다.
tell application "Secure Pipes" to initialize transparent proxy
start transparent proxy
시스템 확장이 준비되면 현재 라우팅 규칙으로 투명 프록시를 시작합니다.
tell application "Secure Pipes" to start transparent proxy
stop transparent proxy
투명 프록시를 중지합니다. 네트워크 공유는 이 서비스에 의존합니다.
tell application "Secure Pipes" to stop transparent proxy
network sharing status
공유 및 게이트웨이 상태를 표시합니다. 실행 중에는 적용 중인 모드, 중지 중에는 저장된 모드를 표시합니다.
tell application "Secure Pipes" to network sharing status
set sharing modes "both"
다음 수동 시작에 사용할 프록시, 게이트웨이, 둘 다 또는 끔 모드를 선택합니다. 변경하기 전에 공유를 중지하세요.
tell application "Secure Pipes" to set sharing modes "both"
start network sharing
선택한 모드와 저장된 주소, 포트, 인증 설정으로 공유를 시작합니다. 확인이 필요할 수 있습니다.
tell application "Secure Pipes" to start network sharing
stop network sharing
게이트웨이와 공유 프록시 리스너를 중지합니다. 투명 프록시는 계속 실행됩니다.
tell application "Secure Pipes" to stop network sharing
종합 예제
tell application "Secure Pipes"
set servers to list proxy servers
set proxyState to transparent proxy status
initialize transparent proxy
start transparent proxy
set sharing modes "both"
set sharingState to network sharing status
start network sharing
stop network sharing
stop transparent proxy
end tell
연결, 활동 및 로그
목록에서 반환된 ID로 정확히 조회합니다. 상세 정보는 JSON 텍스트로 반환됩니다.
group status "engineering"
그룹 결과와 각 구성원의 연결 상태를 확인합니다.
tell application "Secure Pipes" to group status "engineering"
wait for connection "Build Tunnel" timeout 30
연결이 준비될 때까지 기다립니다. 실패하거나 시간이 초과되면 오류를 반환합니다.
tell application "Secure Pipes" to wait for connection "Build Tunnel" timeout 30
preview route "example.com" port 443
현재 시나리오의 로컬 규칙 일치를 예측합니다. 실제 연결 테스트는 아닙니다.
tell application "Secure Pipes" to preview route "example.com" port 443 application "com.apple.Safari" transport "TCP"
test proxy server "proxy-id"
저장된 프록시를 테스트하고 결과, 이유 및 소요 시간을 반환합니다.
tell application "Secure Pipes" to test proxy server "proxy-id"
list active flows "PROXY"
프록시 활동을 확인합니다. 공유는 LAN, 둘 다는 ALL을 사용합니다.
tell application "Secure Pipes" to list active flows "PROXY"
list active flows "LAN"
네트워크 공유 연결을 확인합니다.
tell application "Secure Pipes" to list active flows "LAN"
end active flow "flow-id"
ID로 연결된 흐름 하나를 종료합니다.
tell application "Secure Pipes" to end active flow "flow-id"
list recent logs
민감 정보가 제거된 최근 로그를 최대 200개까지 최신순으로 확인합니다.
tell application "Secure Pipes" to list recent logs
log detail "log-id"
ID로 최근 로그의 전체 기록을 확인합니다.
tell application "Secure Pipes" to log detail "log-id"
터미널 예제
터미널에서 osascript로 AppleScript 명령을 실행합니다. macOS에서 터미널이 Secure Pipes를 제어하도록 허용할지 물을 수 있습니다.
연결 그룹 나열
osascript -e 'tell application "Secure Pipes" to list connection groups'
출력 예시
engineering, on-call
연결 태그가 그룹 구성원을 결정합니다. 그룹 시작 시 저장된 순서, 병렬 또는 순차 모드 및 오류 처리 설정을 따릅니다.
그룹 시작 또는 중지
osascript -e 'tell application "Secure Pipes" to connect group "engineering"'
osascript -e 'tell application "Secure Pipes" to disconnect group "engineering"'
연결 확인 및 제어
osascript -e 'tell application "Secure Pipes" to list connections'
osascript -e 'tell application "Secure Pipes" to connection status "Build Tunnel (Local Forward)"'
osascript -e 'tell application "Secure Pipes" to connect connection "Build Tunnel (Local Forward)"'
터미널에서 실행
파일을 저장한 다음 경로를 osascript에 전달하세요.
osascript ~/Scripts/Connect\ Tunnel.applescript
스크립트 파일로 실행
예제를 .applescript 파일로 저장한 다음 스크립트 편집기나 osascript로 실행하세요.
이름으로 연결
예제 연결 이름을 list connections가 반환하는 이름으로 바꾸세요.
on run
-- Leave this blank to skip opening a URL after connecting.
set postConnectURL to ""
-- Get the saved connections.
tell application "Secure Pipes"
set availableConnections to list connections
end tell
if (count of availableConnections) is 0 then return
set selectedConnection to choose from list availableConnections
if selectedConnection is false then return
set targetConnection to item 1 of selectedConnection
-- Start the selected connection and wait up to 90 seconds.
tell application "Secure Pipes"
connect connection targetConnection
set currentState to "connecting"
repeat with attempt from 1 to 90
set currentState to connection status targetConnection
if currentState is "connected" then exit repeat
if currentState is "authentication failed" or currentState is "unknown host key" or currentState is "host key changed" or currentState is "invalid" or currentState is "error" then exit repeat
delay 1
end repeat
end tell
-- Open the URL only if the connection comes up.
if currentState is "connected" and postConnectURL is not "" then
open location postConnectURL
end if
return currentState
end run
그룹을 선택하고 연결
사용 가능한 태그를 나열하고 그룹을 선택해 해당 연결을 모두 시작합니다.
on run
-- Get the groups saved in Secure Pipes.
tell application "Secure Pipes"
set availableGroups to list connection groups
end tell
-- Let the user know if there are no groups to choose from.
if (count of availableGroups) is 0 then
display dialog "No tagged connection groups are available." buttons {"OK"}
return
end if
-- Ask which group to start.
set selectedGroup to choose from list availableGroups
if selectedGroup is false then return
set targetGroup to item 1 of selectedGroup
tell application "Secure Pipes"
connect group targetGroup
end tell
end run
자동화 권한
macOS에서 요청하면 시스템 설정의 개인정보 보호 및 보안 > 자동화에서 터미널이나 스크립트 편집기 등 스크립트를 실행하는 앱이 Secure Pipes를 제어하도록 허용하세요.
Secure Pipes 2.0.17 기반 · 2026년 11월 9일 업데이트