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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
name: nara
version: 0.0.0.0
synopsis: A userspace WireGuard implementation in Haskell
license: GPL-3
license-file: LICENSE
author: Bin Jin
maintainer: bjin@ctrl-d.org
category: Network
build-type: Simple
extra-source-files: include/uapi.h, cbits/tun.h
cabal-version: >=1.10
description:
nara is a userspace implementation of <https://www.wireguard.io WireGuard> ,
a fast, modern and secure VPN based on <https://noiseprotocol.org/ Noise> protocol.
flag static
description:
enable static build
default:
False
executable nara
hs-source-dirs: app
main-is: Main.hs
ghc-options:
-Wall -Werror -O2 -threaded
if flag(static)
ghc-options:
-optl-static
build-depends:
base,
nara,
directory,
filepath,
unix == 2.7.*,
optparse-applicative
default-language:
Haskell2010
library
-- main-is:
-- Main.hs
exposed-modules:
Network.WireGuard.Core,
Network.WireGuard.Daemon,
Network.WireGuard.Foreign.In6Addr,
Network.WireGuard.Foreign.Key,
Network.WireGuard.Foreign.Tun,
Network.WireGuard.Foreign.UAPI,
Network.WireGuard.RPC,
Network.WireGuard.TunListener,
Network.WireGuard.UdpListener,
Network.WireGuard.Internal.Util,
Network.WireGuard.Internal.Constant,
Network.WireGuard.Internal.IPPacket,
Network.WireGuard.Internal.Noise,
Network.WireGuard.Internal.Packet,
Network.WireGuard.Internal.PacketQueue,
Network.WireGuard.Internal.RpcParsers,
Network.WireGuard.Internal.State,
Network.WireGuard.Internal.Data.Types,
Network.WireGuard.Internal.Data.RpcTypes
build-depends:
async,
attoparsec,
base == 4.9.*,
blake2,
bytestring,
bytestring-conversion,
cacophony >=0.9.2 && <0.10,
cereal,
conduit,
conduit-extra,
cryptonite,
directory,
exceptions,
filepath,
hex,
iproute == 1.7.*,
lens,
memory == 0.14.*,
network == 2.6.*,
optparse-applicative,
random,
stm,
streaming-commons,
transformers,
unix == 2.7.*,
unordered-containers
if os(linux)
c-sources: cbits/tun-linux.c
cpp-options: -DOS_LINUX
if os(darwin)
c-sources: cbits/tun-macos.c
cpp-options: -DOS_MACOS
if !os(linux) && !os(darwin)
buildable: False
ghc-options:
-Wall -O2
if flag(static)
ghc-options:
-optl-static
hs-source-dirs:
src
include-dirs:
include
default-language:
Haskell2010
test-suite nara-test
type: exitcode-stdio-1.0
main-is: Spec.hs
hs-source-dirs:
tests/spec
ghc-options: -Wall
build-depends:
attoparsec
, base == 4.9.*
, hspec
, nara
, bytestring
, conduit-extra
, conduit
, stm
, memory
, cacophony
, hex
, network
, iproute
, unordered-containers
other-modules:
Network.WireGuard.RPCSpec
default-language: Haskell2010
|