1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#:schema https://raw.githubusercontent.com/OlofBlomqvist/odd-box/main/odd-box-schema-v2.2.json
= "V2" # this is the configuration format version, dont change it
= false # optional - allows alpn negotiation for http/1.0 and h2 on tls connections
= "example@example.com" # optional, must be configured if you wish to use lets encrypt for tls certificates
= 8080 # optional, 8080 by default
= "127.0.0.1" # ip for proxy to listen to , can be ipv4/6
= 4343# optional, 4343 by default
= 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.
= "~" # you can use $root_dir in env_var values and dir paths etc.
= "Warn" # trace,info,debug,info,warn,error
= 4200 # port range for automatic port assignment (the env var PORT will be set if you did not specify one manually for a process)
= "standard"
= [
# these are global environment variables - they will be set for all hosted processes
{ = "GRPC_TRACE", = "http,http1,http_keepalive,http2_stream_state" },
{ = "GRPC_VERBOSITY", = "DEBUG" },
]
[[]] # remote targets are those that odd-box is not responsible for running
= "lobsters.localtest.me" # incoming name for binding to (frontend)
= false # optional, false by default: allows capturing wildcard requests such as test.lobsters.local
= 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.
= false # optional, false by default
= false # optional, false by default
= [
{ = true, ="lobste.rs", =443 },
{ = true, ="lobsters.dev", =443, = ["H1","H2","H3","H2C","H2CPK"] } # - hints are optional: used to decide which protocol to use for the target
]
[[]] # hosted processes are those that odd-box is responsible for running
= false # optional, false by default
= "python.localtest.me" # incoming name for binding to (frontend)
= "$cfg_dir" # path where we should be located when running the binary file
= "/usr/bin/python3" # name or path of the binary that should be executed
= ["H2","H2C","H2CPK"] # - optional: used to decide which protocol to use for the target
= [
# any arguments you wish to pass to the binary
"-m",
"http.server",
"$port"
]
= false # optional, uses global auto_start by default. set to false to prevent the process from starting when launching odd-box
= false # must be set to https if the target expects tls connections
= [
# 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"
# ]