Documentation
¶
Index ¶
Constants ¶
const ( GRPCMaxMsgSize = 20 * 1024 * 1024 // 20 MiB - max gRPC message size GRPCStreamBuffer = 16 * 1024 * 1024 // 16 MiB - buffer for streaming reads GRPCOverheadRoom = GRPCMaxMsgSize - GRPCStreamBuffer // 4 MiB headroom )
gRPC message size limits IMPORTANT: GRPCStreamBuffer MUST be smaller than GRPCMaxMsgSize to leave room for protobuf framing overhead (~10-20 bytes per message)
const ( GRPCWindowSize = 16 << 20 // 16 MiB - per-stream and per-connection HTTP/2 window GRPCIOBufferSize = 4 << 20 // 4 MiB - read/write buffer for gRPC transport )
HTTP/2 flow-control tuning for bulk transfer. Go gRPC defaults (64 KiB window, 32 KiB buffers) are designed for small RPC messages and severely throttle large file streams on fast networks.
const BlockSize = 4 * 1024 * 1024 // 4 MiB - larger chunks = fewer gRPC round-trips over WAN
const DefaultBridge = "bridge.keibisoft.com:26600"
const DefaultRelay = "https://keibidroprelay.keibisoft.com/"
const InboundPort = 26431
const OutboundPort = 26432
Variables ¶
This section is empty.
Functions ¶
func ConfigDir ¶
func ConfigDir() string
ConfigDir returns the config directory path (~/.config/keibidrop/). Override with KEIBIDROP_CONFIG_DIR for testing multiple instances on one machine.
func EnsureDirectories ¶
EnsureDirectories creates save_path, mount_path, and log directory if they don't exist.
func Save ¶ added in v0.2.0
Save writes the config to the standard path (~/.config/keibidrop/config.toml).
func WriteDefault ¶
func WriteDefault() error
WriteDefault creates a default config file with comments at the standard path. Does nothing if the file already exists.
Types ¶
type Config ¶
type Config struct {
Relay string `toml:"relay"`
SavePath string `toml:"save_path"`
MountPath string `toml:"mount_path"`
LogFile string `toml:"log_file"`
InboundPort int `toml:"inbound_port"`
OutboundPort int `toml:"outbound_port"`
BridgeAddr string `toml:"bridge_addr"` // TCP bridge relay address
StrictMode bool `toml:"strict_mode"` // Disable data relay fallback
NoFUSE bool `toml:"no_fuse"`
Incognito bool `toml:"incognito"`
PrefetchOnOpen bool `toml:"prefetch_on_open"`
PushOnWrite bool `toml:"push_on_write"`
PassphraseProtect bool `toml:"passphrase_protect"` // opt into Tier 2 (Argon2id passphrase) for identity at-rest encryption
}
Config holds all user-configurable settings. Resolution order: built-in defaults → config file → environment variables.