2017-03-18 10:20:26 +00:00
|
|
|
(* Copyright (C) 2017, Thomas Leonard <thomas.leonard@unikernel.com>
|
2015-12-30 09:52:24 +00:00
|
|
|
See the README file for details. *)
|
|
|
|
|
|
|
|
(** Configuration for the "mirage" tool. *)
|
|
|
|
|
|
|
|
open Mirage
|
|
|
|
|
2017-03-15 08:56:24 +00:00
|
|
|
let table_size =
|
2022-03-30 03:12:01 -04:00
|
|
|
let info = Key.Arg.info
|
2017-03-15 08:56:24 +00:00
|
|
|
~doc:"The number of NAT entries to allocate."
|
|
|
|
~docv:"ENTRIES" ["nat-table-size"]
|
|
|
|
in
|
2022-03-30 03:12:01 -04:00
|
|
|
let key = Key.Arg.opt ~stage:`Both Key.Arg.int 5_000 info in
|
|
|
|
Key.create "nat_table_size" key
|
2017-03-15 08:56:24 +00:00
|
|
|
|
2015-12-30 09:52:24 +00:00
|
|
|
let main =
|
|
|
|
foreign
|
2022-03-30 03:12:01 -04:00
|
|
|
~keys:[Key.v table_size]
|
2017-03-02 14:52:55 +00:00
|
|
|
~packages:[
|
2019-04-03 12:32:13 +01:00
|
|
|
package "vchan" ~min:"4.0.2";
|
2017-03-02 14:52:55 +00:00
|
|
|
package "cstruct";
|
2019-02-01 09:25:29 +00:00
|
|
|
package "astring";
|
2019-03-17 16:32:17 -05:00
|
|
|
package "tcpip" ~min:"3.7.0";
|
2020-12-03 21:19:46 +01:00
|
|
|
package ~min:"2.3.0" ~sublibs:["mirage"] "arp";
|
2022-01-09 12:36:35 +01:00
|
|
|
package ~min:"3.0.0" "ethernet";
|
2017-11-14 12:35:33 +00:00
|
|
|
package "shared-memory-ring" ~min:"3.0.0";
|
2022-11-11 13:37:43 +01:00
|
|
|
package ~min:"2.1.2" "netchannel";
|
2019-04-03 12:32:13 +01:00
|
|
|
package "mirage-net-xen";
|
2021-11-05 18:55:30 +01:00
|
|
|
package "ipaddr" ~min:"5.2.0";
|
2020-12-03 16:11:56 +00:00
|
|
|
package "mirage-qubes" ~min:"0.9.1";
|
2022-11-11 13:37:43 +01:00
|
|
|
package ~min:"3.0.1" "mirage-nat";
|
2017-03-02 14:52:55 +00:00
|
|
|
package "mirage-logs";
|
2022-07-27 14:26:58 +02:00
|
|
|
package "mirage-xen" ~min:"8.0.0";
|
2022-10-27 11:24:59 +02:00
|
|
|
package ~min:"6.4.0" "dns-client";
|
2020-04-29 15:58:01 +02:00
|
|
|
package "pf-qubes";
|
2017-03-02 14:52:55 +00:00
|
|
|
]
|
2022-03-30 03:12:01 -04:00
|
|
|
"Unikernel.Main" (random @-> mclock @-> time @-> job)
|
2015-12-30 09:52:24 +00:00
|
|
|
|
|
|
|
let () =
|
2022-03-30 03:12:01 -04:00
|
|
|
register "qubes-firewall" [main $ default_random $ default_monotonic_clock $ default_time]
|