80 lines
2.3 KiB
Markdown
80 lines
2.3 KiB
Markdown
---
|
|
# generated by https://github.com/hashicorp/terraform-plugin-docs
|
|
page_title: "tor_obfs4_bridge_line Data Source - tor"
|
|
subcategory: ""
|
|
description: |-
|
|
Generates a complete Tor bridge line using obfs4 state and network details
|
|
---
|
|
|
|
# tor_obfs4_bridge_line (Data Source)
|
|
|
|
Generates a complete Tor bridge line using obfs4 state and network details
|
|
|
|
## Example Usage
|
|
|
|
```terraform
|
|
# Copyright (c) HashiCorp, Inc.
|
|
|
|
terraform {
|
|
required_providers {
|
|
tor = {
|
|
source = "guardianproject/tor"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "tor" {}
|
|
|
|
# Example: Generate a bridge line from existing components
|
|
data "tor_obfs4_bridge_line" "example" {
|
|
ip_address = "192.0.2.1"
|
|
port = 443
|
|
identity_fingerprint_sha1 = "1234567890abcdef1234567890abcdef12345678"
|
|
obfs4_state_certificate = "example-cert-value"
|
|
obfs4_state_iat_mode = 0
|
|
}
|
|
|
|
output "bridge_line" {
|
|
description = "Generated bridge line for clients"
|
|
value = data.tor_obfs4_bridge_line.example.bridge_line
|
|
}
|
|
|
|
# Example: Complete workflow integration
|
|
resource "tor_relay_identity_rsa" "bridge" {}
|
|
|
|
resource "tor_relay_identity_ed25519" "bridge" {}
|
|
|
|
resource "tor_obfs4_state" "bridge" {
|
|
rsa_identity_private_key = tor_relay_identity_rsa.bridge.private_key_pem
|
|
ed25519_identity_private_key = tor_relay_identity_ed25519.bridge.private_key_pem
|
|
}
|
|
|
|
data "tor_obfs4_bridge_line" "integrated" {
|
|
ip_address = "10.0.0.1"
|
|
port = 9001
|
|
identity_fingerprint_sha1 = tor_relay_identity_rsa.bridge.public_key_fingerprint_sha1
|
|
obfs4_state_certificate = tor_obfs4_state.bridge.certificate
|
|
obfs4_state_iat_mode = tor_obfs4_state.bridge.iat_mode
|
|
}
|
|
|
|
output "integrated_bridge_line" {
|
|
description = "Bridge line from integrated workflow"
|
|
value = data.tor_obfs4_bridge_line.integrated.bridge_line
|
|
}
|
|
```
|
|
|
|
<!-- schema generated by tfplugindocs -->
|
|
## Schema
|
|
|
|
### Required
|
|
|
|
- `identity_fingerprint_sha1` (String) SHA1 fingerprint of the RSA identity key
|
|
- `ip_address` (String) Bridge IP address
|
|
- `obfs4_state_certificate` (String) Base64-encoded certificate from tor_obfs4_state resource
|
|
- `obfs4_state_iat_mode` (Number) Inter-Arrival Time mode from tor_obfs4_state resource
|
|
- `port` (Number) Bridge port number
|
|
|
|
### Read-Only
|
|
|
|
- `bridge_line` (String) Complete bridge line ready for client use
|
|
- `id` (String) Data source identifier
|