soratun 設定ファイルリファレンス
SORACOM Arc クライアント soratun 設定ファイル (デフォルト arc.json
) のスキーマです。手動で編集できますが一貫性のない変更を行った場合接続できなくなる可能性があります。可能な限り soratun bootstrap
コマンドを使用してください。
設定ファイルの例:
{
"privateKey": "12345678__CLIENT_PEER_PRIVATE_KEY__90ABCDEF=",
"publicKey": "GHIJKLMN__CLIENT_PEER_PUBLIC_KEY__OPQRSTUVW=",
"simId": "8900001234567890123",
"logLevel": 2,
"enableMetrics": true,
"interface": "utun",
"arcSessionStatus": {
"arcServerPeerPublicKey": "XYZabcde__SERVER_PEER_PUBLIC_KEY__fghijklmn=",
"arcServerEndpoint": "xxxxx.arc.soracom.io:11010",
"arcAllowedIPs": [
"100.127.0.0/21",
"100.127.10.0/28",
"100.127.10.128/25",
"100.127.10.17/32",
"100.127.10.18/31",
"100.127.10.20/30",
"100.127.10.24/29",
"100.127.10.32/27",
"100.127.10.64/26",
"100.127.11.0/24",
"100.127.12.0/22",
"100.127.128.0/17",
"100.127.16.0/20",
"100.127.32.0/19",
"100.127.64.0/18",
"100.127.8.0/23",
"54.250.252.67/32"
],
"arcClientPeerIpAddress": "10.227.47.214"
},
"additionalAllowedIPs": [
"10.128.0.0/9"
]
}
Property | Type | Description |
---|---|---|
enableMetrics * | boolean |
|
interface * | string | soratun が作成する WireGuard インターフェースの名称。macOS でテストする場合、OS の制限のため utun で始まる文字列を指定してください。 |
logLevel * | integer | ログレベル (0 : 出力無し、1 : エラーのみ出力、2 : デバッグ情報も出力) |
privateKey * | string | クライアントピア秘密鍵 |
publicKey * | string | Arc サーバーのサーバーピア公開鍵 |
additionalAllowedIPs | string[] | WireGuard インターフェース経由にするネットワークの CIDR を、文字列の配列で指定します。 たとえば、バーチャル SIM/Subscriber でデバイス間通信 (Gate D2D) を利用する場合に、VPG の (デフォルトでは 設定例:
なお、WireGuard インターフェース経由で通信すると、Arc のデータ通信料 が発生します。SORACOM を経由する必要がない場合は、 |
arcSessionStatus | arcSessionStatus | WireGuard の接続情報。自動的に生成または更新されますので編集しないでください。詳しくは、arcSessionStatus を参照してください。 |
mtu | integer | soratun が作成する WireGuard インターフェースの MTU |
persistentKeepalive | integer | Arc サーバーとの接続における KeepAlive パケットの送信間隔 (秒) |
postDown | array[] | WireGuard インターフェース削除後に実行されるコマンドの配列。1 つのコマンドは ["executable", "param1", "param2"] の形式で指定してください。なお、%i はインターフェース名に置換されます。また、コマンドは記載した順序で実行されます。例: "postDown": [ [ "/bin/echo", "postDown", "%i" ], [ "echo", "%i" ] ] |
postUp | array[] | WireGuard インターフェース作成後に実行されるコマンドの配列。1 つのコマンドは ["executable", "param1", "param2"] の形式で指定してください。なお、%i はインターフェース名に置換されます。また、コマンドは記載した順序で実行されます。例: "postUp": [ [ "/bin/echo", "postUp", "%i" ], [ "echo", "%i" ] ] |
profile | profile | SORACOM API 接続情報。詳しくは、profile を参照してください。 |
simId | string | バーチャル SIM の SIM ID |
以下は、"logLevel": 2
を指定した場合の出力例です。
$ sudo soratun up --config /path/to/arc.json
DEBUG: (soratun0) 2021/06/17 14:37:03 device started
DEBUG: (soratun0) 2021/06/17 14:37:03 UAPI listener started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: encryption worker 1 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: decryption worker 1 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: handshake worker 1 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: encryption worker 2 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: decryption worker 2 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: handshake worker 2 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: encryption worker 3 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: handshake worker 4 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: decryption worker 3 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: handshake worker 3 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: encryption worker 4 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: decryption worker 4 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: event worker - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Interface up requested
DEBUG: (soratun0) 2021/06/17 14:37:03 UDP bind has been updated
DEBUG: (soratun0) 2021/06/17 14:37:03 Interface state was Down, requested Up, now Up
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: receive incoming v6 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 UAPI: Updating private key
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: receive incoming v4 - started
DEBUG: (soratun0) 2021/06/17 14:37:03 Routine: TUN reader - started
DEBUG: (soratun0) 2021/06/17 14:37:03 UAPI: Removing all peers
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - Starting
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - UAPI: Created
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - UAPI: Updating endpoint
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - UAPI: Updating persistent keepalive interval
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - Sending keepalive packet
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - Sending handshake initiation
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - Routine: sequential sender - started
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - Routine: sequential receiver - started
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - UAPI: Removing all allowedips
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - UAPI: Adding allowedip
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - UAPI: Adding allowedip
DEBUG: (soratun0) 2021/06/17 14:37:03 assign IP address: x.x.x.x
DEBUG: (soratun0) 2021/06/17 14:37:03 set link up: soratun0
DEBUG: (soratun0) 2021/06/17 14:37:03 add route: 100.127.0.0/16
DEBUG: (soratun0) 2021/06/17 14:37:03 Interface up requested
DEBUG: (soratun0) 2021/06/17 14:37:03 peer(cx/Q…7vVA) - Received handshake response
arcSessionStatus
WireGuard の接続情報。自動的に生成または更新されます。編集しないでください。
Property | Type | Description |
---|---|---|
arcAllowedIPs * | string[] | Arc サーバーから受信した WireGuard AllowedIPs の配列 |
arcClientPeerIpAddress * | string | クライアントの IP アドレス |
arcServerEndpoint * | string | Arc サーバーの UDP エンドポイント (IP アドレスまたはホスト名:ポート番号 ) |
arcServerPeerPublicKey * | string | サーバーピア公開鍵 |
profile
SORACOM API 接続情報。soratun で SORACOM API の認証キーを使用してバーチャル SIM/Subscriber をブートストラップ した際 (soratun bootstrap authkey
を実行した際) に保存されます。その他のブートストラップ方法では使用されません。
Property | Type | Description |
---|---|---|
authKeyId * | string | SAM ユーザーの認証キー ID |
authKey * | string | SAM ユーザーの認証キーシークレット |
endpoint * | string | SORACOM API のエンドポイント。カバレッジタイプによって異なります。
|