2024-04-23 16:09:53 +00:00
|
|
|
(* mirage >= 4.5.0 & < 5.0.0 *)
|
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
|
|
|
|
|
2024-04-23 15:21:51 +00:00
|
|
|
let nat_table_size = runtime_arg ~pos:__POS__ "Unikernel.nat_table_size"
|
|
|
|
let ipv4 = runtime_arg ~pos:__POS__ "Unikernel.ipv4"
|
|
|
|
let ipv4_gw = runtime_arg ~pos:__POS__ "Unikernel.ipv4_gw"
|
|
|
|
let ipv4_dns = runtime_arg ~pos:__POS__ "Unikernel.ipv4_dns"
|
|
|
|
let ipv4_dns2 = runtime_arg ~pos:__POS__ "Unikernel.ipv4_dns2"
|
2023-06-30 14:58:08 +00:00
|
|
|
|
2015-12-30 09:52:24 +00:00
|
|
|
let main =
|
2024-04-23 15:21:51 +00:00
|
|
|
main
|
2024-04-23 16:09:53 +00:00
|
|
|
~runtime_args:[ nat_table_size; ipv4; ipv4_gw; ipv4_dns; ipv4_dns2; ]
|
2017-03-02 14:52:55 +00:00
|
|
|
~packages:[
|
2019-04-03 11:32:13 +00:00
|
|
|
package "vchan" ~min:"4.0.2";
|
2017-03-02 14:52:55 +00:00
|
|
|
package "cstruct";
|
2019-03-17 21:32:17 +00:00
|
|
|
package "tcpip" ~min:"3.7.0";
|
2024-04-23 16:09:53 +00:00
|
|
|
package ~min:"2.3.0" ~sublibs:["mirage"] "arp";
|
|
|
|
package ~min:"3.0.0" "ethernet";
|
2017-11-14 12:35:33 +00:00
|
|
|
package "shared-memory-ring" ~min:"3.0.0";
|
2024-05-06 14:13:17 +00:00
|
|
|
package "mirage-net-xen" ~min:"2.1.4";
|
2021-11-05 17:55:30 +00:00
|
|
|
package "ipaddr" ~min:"5.2.0";
|
2020-12-03 16:11:56 +00:00
|
|
|
package "mirage-qubes" ~min:"0.9.1";
|
2024-04-23 16:09:53 +00:00
|
|
|
package ~min:"3.0.1" "mirage-nat";
|
2017-03-02 14:52:55 +00:00
|
|
|
package "mirage-logs";
|
2022-07-27 12:26:58 +00:00
|
|
|
package "mirage-xen" ~min:"8.0.0";
|
2024-04-23 16:09:53 +00:00
|
|
|
package ~min:"6.4.0" "dns-client";
|
2020-04-29 13:58:01 +00:00
|
|
|
package "pf-qubes";
|
2017-03-02 14:52:55 +00:00
|
|
|
]
|
2022-03-30 07:12:01 +00:00
|
|
|
"Unikernel.Main" (random @-> mclock @-> time @-> job)
|
2015-12-30 09:52:24 +00:00
|
|
|
|
|
|
|
let () =
|
2022-03-30 07:12:01 +00:00
|
|
|
register "qubes-firewall" [main $ default_random $ default_monotonic_clock $ default_time]
|