#:schema https://raw.githubusercontent.com/OlofBlomqvist/odd-box/main/odd-box-schema-v2.json version = "V2" # this is the configuration format version, dont change it alpn = false # optional - allows alpn negotiation for http/1.0 and h2 on tls connections lets_encrypt_account_email = "example@example.com" # optional, must be configured if you wish to use lets encrypt for tls certificates http_port = 8080 # optional, 8080 by default admin_api_port = 1234 # optional - leave out to disable the admin api ip = "127.0.0.1" # ip for proxy to listen to , can be ipv4/6 tls_port = 4343# optional, 4343 by default auto_start = false # optional, defaults to true - used as default value for configured sites. auto_start false means a site will not start automatically with odd-box, # but it will still be automatically started on incoming requests to that site. root_dir = "~" # you can use $root_dir in env_var values and dir paths etc. log_level = "Warn" # trace,info,debug,info,warn,error port_range_start = 4200 # port range for automatic port assignment (the env var PORT will be set if you did not specify one manually for a process) default_log_format = "standard" env_vars = [ # these are global environment variables - they will be set for all hosted processes { key = "GRPC_TRACE", value = "http,http1,http_keepalive,http2_stream_state" }, { key = "GRPC_VERBOSITY", value = "DEBUG" }, ] [[remote_target]] # remote targets are those that odd-box is not responsible for running host_name = "lobsters.localtest.me" # incoming name for binding to (frontend) capture_subdomains = false # optional, false by default: allows capturing wildcard requests such as test.lobsters.local forward_subdomains = false # optional, false by default: if the request is for subdomain.configureddomain.local with target example.com, # this option would cause the proxied request go to subdomain.example.com instead of example.com. disable_tcp_tunnel_mode = false # optional, false by default enable_lets_encrypt = false # optional, false by default backends = [ { https = true, address="lobste.rs", port=443 }, { https = true, address="lobsters.dev", port=443, hints = ["H2","H2C","H2CPK"] # - optional: used to decide which protocol to use for the target } ] [[hosted_process]] # hosted processes are those that odd-box is responsible for running enable_lets_encrypt = false # optional, false by default host_name = "python.localtest.me" # incoming name for binding to (frontend) dir = "$cfg_dir" # path where we should be located when running the binary file bin = "/usr/bin/python3" # name or path of the binary that should be executed hints = ["H2","H2C","H2CPK"] # - optional: used to decide which protocol to use for the target args = [ # any arguments you wish to pass to the binary "-m", "http.server", "$port" ] auto_start = false # optional, uses global auto_start by default. set to false to prevent the process from starting when launching odd-box https = false # must be set to https if the target expects tls connections env_vars = [ # environment variables specific to this process # { key = "logserver", value = "http://www.example.com" }, # { key = "host", value = "odd-box" }, ] # [[hosted_process]] # host_name = "some_host.local" # dir = "$root_dir" # bin = "my_bin" # args = [ # any arguments you wish to pass to the binary # "--test" # ] # auto_start = false # optional, uses global auto_start by default. set to false to prevent the process from starting when launching odd-box # https = true # must be set to https if the target expects tls connections # port = 443 # optional, defaults to 443 for https configurations and 80 otherwise # env_vars = [ # # environment variables specific to this process # { key = "logserver", value = "http://www.example.com" }, # { key = "host", value = "odd-box" }, # ] # [[hosted_process]] # host_name = "caddy.localtest.me" # disable_tcp_tunnel_mode = true # port = 9999 # bin = "/nix/store/aq5r61lmr9six0lyi6xikxwvnyp16dfy-user-environment/bin/caddy" # args = [ # "run", # "--config", # "./CaddyTest", # "--adapter", # "caddyfile" # ]