2017-03-18 06:20:26 -04:00
|
|
|
(* Copyright (C) 2017, Thomas Leonard <thomas.leonard@unikernel.com>
|
2015-12-30 04:52:24 -05:00
|
|
|
See the README file for details. *)
|
|
|
|
|
|
|
|
(** Configuration for the "mirage" tool. *)
|
|
|
|
|
|
|
|
open Mirage
|
|
|
|
|
2017-03-15 04:56:24 -04:00
|
|
|
let table_size =
|
|
|
|
let open Functoria_key in
|
|
|
|
let info = Arg.info
|
|
|
|
~doc:"The number of NAT entries to allocate."
|
|
|
|
~docv:"ENTRIES" ["nat-table-size"]
|
|
|
|
in
|
|
|
|
let key = Arg.opt ~stage:`Both Arg.int 5_000 info in
|
|
|
|
create "nat_table_size" key
|
|
|
|
|
2015-12-30 04:52:24 -05:00
|
|
|
let main =
|
|
|
|
foreign
|
2017-03-15 04:56:24 -04:00
|
|
|
~keys:[Functoria_key.abstract table_size]
|
2017-03-02 09:52:55 -05:00
|
|
|
~packages:[
|
2019-04-03 07:32:13 -04:00
|
|
|
package "vchan" ~min:"4.0.2";
|
2017-03-02 09:52:55 -05:00
|
|
|
package "cstruct";
|
2019-02-01 04:25:29 -05:00
|
|
|
package "astring";
|
2019-03-17 17:32:17 -04:00
|
|
|
package "tcpip" ~min:"3.7.0";
|
|
|
|
package "arp";
|
|
|
|
package "arp-mirage";
|
|
|
|
package "ethernet";
|
|
|
|
package "mirage-protocols";
|
2017-11-14 07:35:33 -05:00
|
|
|
package "shared-memory-ring" ~min:"3.0.0";
|
2019-06-22 09:53:25 -04:00
|
|
|
package "netchannel" ~min:"1.11.0";
|
2019-04-03 07:32:13 -04:00
|
|
|
package "mirage-net-xen";
|
2019-07-28 07:08:15 -04:00
|
|
|
package "ipaddr" ~min:"4.0.0";
|
2020-04-29 09:58:01 -04:00
|
|
|
package "mirage-qubes" ~min:"0.8.2";
|
|
|
|
package "mirage-nat" ~min:"2.2.1";
|
2017-03-02 09:52:55 -05:00
|
|
|
package "mirage-logs";
|
2020-01-11 08:34:25 -05:00
|
|
|
package "mirage-xen" ~min:"5.0.0";
|
2020-04-29 10:06:48 -04:00
|
|
|
package ~min:"4.5.0" "dns-client";
|
2020-04-29 09:58:01 -04:00
|
|
|
package "pf-qubes";
|
2017-03-02 09:52:55 -05:00
|
|
|
]
|
2020-04-29 09:58:01 -04:00
|
|
|
"Unikernel.Main" (random @-> mclock @-> job)
|
2015-12-30 04:52:24 -05:00
|
|
|
|
|
|
|
let () =
|
2020-04-29 09:58:01 -04:00
|
|
|
register "qubes-firewall" [main $ default_random $ default_monotonic_clock]
|
2016-04-30 08:35:24 -04:00
|
|
|
~argv:no_argv
|