Compare commits
No commits in common. "c292c7ba71351d7f8981d19bca0ca6b2a4f2d13d" and "ffcc66e240e23093d9d7783535a6de4a47f93619" have entirely different histories.
c292c7ba71
...
ffcc66e240
6 changed files with 28 additions and 66 deletions
32
README.md
32
README.md
|
|
@ -1,36 +1,18 @@
|
|||
# dnsmanager interface
|
||||
|
||||
### Quick Start
|
||||
|
||||
To install and test this application, you'll need:
|
||||
- both **purs** and **spago** binaries, in order to compile this purescript application;
|
||||
- both [authd][authd] and [dnsmanagerd][dnsmanagerd], in order to use this dnsmanager webclient with its related services, and they both require [libipc][libipc];
|
||||
- both **purs** and **spago**, in order to compile this purescript application;
|
||||
- both **authd** and **dnsmanagerd**, in order to use this dnsmanager webclient with its related services, and they both require **libipc**;
|
||||
- (optional) a http server to serve the website and its documentation (such as darkhttpd, which is used in the makefile).
|
||||
|
||||
To compile this purescript application:
|
||||
```sh
|
||||
make
|
||||
make bundle
|
||||
```
|
||||
|
||||
### Introduction
|
||||
|
||||
`dnsmanager-webclient` is the official interface for [dnsmanager][dnsmanagerd],
|
||||
the software being the [net libre][netlibre] service which provides free domain names.
|
||||
|
||||
This web application is fully written in [PureScript][purescript] with the [Halogen][halogen] library and using the [Bulma][bulma] CSS library.
|
||||
|
||||
This web application provides a simple user interface to manage DNS zones with many types of DNS resources:
|
||||
- basic entries such as: A, AAAA, NS, CNAME, TXT, SRV
|
||||
- mail-related entries: MX, SPF, DKIM, DMARC
|
||||
- CAA
|
||||
|
||||
### Status
|
||||
|
||||
This web application is already deployed on [the netlibre website][netlibre].
|
||||
However, there is still room for improvement, see TODO.md.
|
||||
|
||||
[authd]: https://git.baguette.netlib.re/Baguette/authd
|
||||
[dnsmanagerd]: https://git.baguette.netlib.re/Baguette/dnsmanager
|
||||
[libipc]: https://git.baguette.netlib.re/Baguette/libipc
|
||||
[netlibre]: https://netlib.re/
|
||||
[purescript]: https://www.purescript.org/
|
||||
[halogen]: https://github.com/purescript-halogen/purescript-halogen/
|
||||
[bulma]: https://bulma.io/
|
||||
This code is a **beta version** of the official interface for `dnsmanager` (second edition).
|
||||
It will soon change in numerous ways, but represents an acceptable start for the **dnsmanager webclient** project.
|
||||
|
|
|
|||
|
|
@ -110,9 +110,6 @@ foreign import unsafeSetInnerHTML :: HTMLElement -> RawHTML -> Effect Unit
|
|||
-- | Current limit is 30 minutes (`max_keepalive` = 60, 60 * 30 seconds = 30 minutes).
|
||||
max_keepalive = 60 :: Int
|
||||
|
||||
wsURLauthd = "wss://www.netlib.re/ws/authd" :: String
|
||||
wsURLdnsmanagerd = "wss://www.netlib.re/ws/dnsmanagerd" :: String
|
||||
|
||||
data Action
|
||||
= Initialize
|
||||
|
||||
|
|
@ -318,15 +315,12 @@ render state
|
|||
migration_warning =
|
||||
HH.div [HP.classes [C.notification, C.is_warning]]
|
||||
[ Bulma.p """
|
||||
⚠️ (FR) le service a été migré d'une ancienne base de code récemment.
|
||||
Le développement se poursuit mais le service devrait être stable, mis à part quelques redémarrages de temps à autre.
|
||||
Merci de nous contacter si vous voyez une erreur.
|
||||
⚠️ MIGRATION EN COURS (FR): la migration est en cours et nous faisons notre possible pour avoir un service en étant de fonctionnement le plus rapidement possible.
|
||||
Merci de garder patience. :)
|
||||
"""
|
||||
, Bulma.p """
|
||||
⚠️ (EN) migration from old codebase was performed.
|
||||
Development is still on-going but the service should be fairly stable.
|
||||
Reboots will happen on occasion.
|
||||
Please contact us in case an error occurs.
|
||||
⚠️ ONGOING MIGRATION (EN): please note that the migration is still on-going.
|
||||
Bugs and server reboot can happen anytime.
|
||||
"""
|
||||
]
|
||||
|
||||
|
|
@ -353,10 +347,10 @@ render state
|
|||
then HH.div_ []
|
||||
else Bulma.btn_ [C.is_large, C.is_danger] "You have been disconnected. Click here to reconnect." Reconnection
|
||||
render_auth_WS :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||
render_auth_WS = HH.slot _ws_auth unit WS.component (Tuple wsURLauthd "authd") AuthenticationDaemonEvent
|
||||
render_auth_WS = HH.slot _ws_auth unit WS.component (Tuple "wss://beta.netlib.re/ws/authd" "authd") AuthenticationDaemonEvent
|
||||
|
||||
render_dnsmanager_WS :: forall monad. MonadAff monad => H.ComponentHTML Action ChildSlots monad
|
||||
render_dnsmanager_WS = HH.slot _ws_dns unit WS.component (Tuple wsURLdnsmanagerd "dnsmanagerd") DNSManagerDaemonEvent
|
||||
render_dnsmanager_WS = HH.slot _ws_dns unit WS.component (Tuple "wss://beta.netlib.re/ws/dnsmanagerd" "dnsmanagerd") DNSManagerDaemonEvent
|
||||
|
||||
render_notifications =
|
||||
case state.notif of
|
||||
|
|
@ -402,7 +396,7 @@ render state
|
|||
[ HH.div [ HP.classes [C.container, C.has_text_centered] ]
|
||||
[ HH.p [ HP.classes [C.subtitle] ]
|
||||
[ HH.strong_ [ HH.u_ [ HH.text "net libre" ]]
|
||||
, HH.text ": providing free domains since 2013!"
|
||||
, HH.text ": providing free domains since 2015!"
|
||||
]
|
||||
]
|
||||
]
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ render _ = HH.div_
|
|||
afin de purger un certain nombre de vieux comptes de robots.
|
||||
"""
|
||||
, HH.p [ HP.classes [C.margin_top 3] ]
|
||||
[ Bulma.outside_link [C.button, C.is_info] url_linuxfr "Article linuxfr.org présentant la nouvelle version de netlibre" ]
|
||||
[ Bulma.outside_link [C.button, C.is_info] url_linuxfr "(LIEN BIENTÔT DISPONIBLE, l'article n'est pas encore publié)." ]
|
||||
]
|
||||
, Bulma.section_small
|
||||
[ Bulma.h1 "Welcome to netlib.re"
|
||||
|
|
@ -65,7 +65,7 @@ render _ = HH.div_
|
|||
]
|
||||
]
|
||||
where
|
||||
url_linuxfr = "https://linuxfr.org/news/netlibre-un-service-libre-et-un-nom-de-domaine-gratuit"
|
||||
url_linuxfr = "https://linuxfr.org"
|
||||
title = Bulma.h3
|
||||
expl content = Bulma.div_content [] [ Bulma.explanation content ]
|
||||
p = Bulma.p
|
||||
|
|
@ -96,7 +96,7 @@ render _ = HH.div_
|
|||
render_updates
|
||||
= b [ title "Automatic updates"
|
||||
, p "Update your records with a single, stupidly simple command. For example:"
|
||||
, expl [ Bulma.strong "wget https://www.netlib.re/token-update/<token>" ]
|
||||
, expl [ Bulma.strong "wget https://netlib.re/token-update/<token>" ]
|
||||
, p "Every A and AAAA records have tokens for easy updates."
|
||||
]
|
||||
|
||||
|
|
@ -108,8 +108,7 @@ render _ = HH.div_
|
|||
render_contact
|
||||
= b [ title "Contact"
|
||||
, p "You have a question, you have seen a bug, you have suggestions or you just want to chat?"
|
||||
, p "You can contact me: philippe@netlib.re"
|
||||
, p "For legal matter: abuse@netlib.re"
|
||||
, p "You can contact us: netlibre@karchnu.fr"
|
||||
]
|
||||
|
||||
render_how_and_code = Bulma.columns_ [ render_how, render_code ]
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ default_empty_rr :: ResourceRecord
|
|||
default_empty_rr = default_rr_A
|
||||
|
||||
default_qualifier_str = "hard_fail" :: String
|
||||
default_caa = { flag: 0, tag: CAA.Issue, value: "letsencrypt.org" } :: CAA.CAA
|
||||
default_caa = { flag: 0, tag: CAA.Issue, value: "" } :: CAA.CAA
|
||||
|
||||
initialState :: Input -> State
|
||||
initialState domain =
|
||||
|
|
@ -476,9 +476,6 @@ render state
|
|||
, Bulma.selection_field'' "tagCAA" "Tag" CAA_tag (A.zip CAA.tags_txt CAA.tags_raw)
|
||||
CAA.Issue
|
||||
(Just (fromMaybe default_caa state._currentRR.caa).tag)
|
||||
, HH.div [HP.classes [C.notification, C.is_warning]]
|
||||
[ Bulma.p "⚠️ CAA entries aren't thoroughly verified, yet. Also, do not put quotes."
|
||||
]
|
||||
, Bulma.box_input "valueCAA" "Value" "" (updateForm Field_CAA_value)
|
||||
(fromMaybe default_caa state._currentRR.caa).value
|
||||
]
|
||||
|
|
@ -887,13 +884,7 @@ handleAction = case _ of
|
|||
|
||||
CAA_tag v -> do
|
||||
state <- H.get
|
||||
let new_tag = fromMaybe CAA.Issue $ CAA.tags A.!! v
|
||||
new_value = case new_tag of
|
||||
CAA.Issue -> "letsencrypt.org"
|
||||
CAA.ContactEmail -> "contact@example.com"
|
||||
CAA.ContactPhone -> "0203040506"
|
||||
_ -> ""
|
||||
new_caa = (fromMaybe default_caa state._currentRR.caa) { tag = new_tag, value = new_value }
|
||||
let new_caa = (fromMaybe default_caa state._currentRR.caa) { tag = fromMaybe CAA.Issue $ CAA.tags A.!! v }
|
||||
H.modify_ _ { _currentRR { caa = Just new_caa } }
|
||||
|
||||
SRV_Protocol v -> H.modify_ _ { _currentRR { protocol = RR.srv_protocols A.!! v } }
|
||||
|
|
|
|||
|
|
@ -26,15 +26,15 @@ tokens = HH.div_
|
|||
, HH.u_ [HH.text "53be0c45-61c4-4d29-8ae9-c2cc8767603d"]
|
||||
, HH.text ") for this specific entry, then make your server regularly visit the following website."
|
||||
]
|
||||
, expl [ HH.p_ [ HH.text "https://www.netlib.re/token-update/"
|
||||
, expl [ HH.p_ [ HH.text "https://beta.netlib.re/token-update/"
|
||||
, HH.u_ [HH.text "<your-token>"]
|
||||
]
|
||||
]
|
||||
, Bulma.p "For example: https://www.netlib.re/token-update/53be0c45-61c4-4d29-8ae9-c2cc8767603d"
|
||||
, Bulma.p "For example: https://beta.netlib.re/token-update/53be0c45-61c4-4d29-8ae9-c2cc8767603d"
|
||||
, Bulma.hr
|
||||
, Bulma.h3 "How to automate the update of my IP address?"
|
||||
, Bulma.p "On Linux, you can make your computer access the update link with the following command."
|
||||
, expl [ Bulma.strong "wget https://www.netlib.re/token-update/<your-token>" ]
|
||||
, expl [ Bulma.strong "wget https://beta.netlib.re/token-update/<your-token>" ]
|
||||
, Bulma.p """
|
||||
No need for a more complex program. This works just fine.
|
||||
And you can run this command every hour.
|
||||
|
|
@ -482,8 +482,7 @@ srv_introduction =
|
|||
]
|
||||
]
|
||||
|
||||
website_owner_address = "philippe AT netlib.re" :: String
|
||||
website_abuse_address = "abuse AT netlib.re" :: String
|
||||
website_owner_address = "netlibre AT karchnu.fr" :: String
|
||||
|
||||
legal_notice :: forall w i. HH.HTML w i
|
||||
legal_notice = HH.div_
|
||||
|
|
@ -493,9 +492,6 @@ legal_notice = HH.div_
|
|||
, expl [ HH.p_ [ HH.text "You can contact this website's owner and publisher at: "
|
||||
, Bulma.strong website_owner_address
|
||||
]
|
||||
, HH.p_ [ HH.text "For legal matter: "
|
||||
, Bulma.strong website_abuse_address
|
||||
]
|
||||
]
|
||||
|
||||
, Bulma.strong "Website Hosting"
|
||||
|
|
|
|||
|
|
@ -263,14 +263,14 @@ validationSPF form = ado
|
|||
, v = form.v, mechanisms = Just mechanisms
|
||||
, modifiers = Just modifiers, q = form.q }
|
||||
|
||||
-- | Accepted RSA key sizes = 1024, 2048 or 4096 bits, 256 bits for ED25519.
|
||||
-- | Accepted RSA key sizes = 2048 or 4096 bits, 256 bits for ED25519.
|
||||
-- |
|
||||
-- | Since the public key representation for the RSA algorithm is in PKCS format (RFC 5958)
|
||||
-- | then converted in PEM (RFC 7468), and knowing this format enables some optional parameters,
|
||||
-- | it is not possible to expect an exact size for the public key input.
|
||||
-- | Consequently, we expect *at least* an input of 128 bytes for public key, loosely leading
|
||||
-- | to accept key sizes of at least 1024 bits. Maximum allowed key size is also arbitrary.
|
||||
rsa_min_key_size = 128 :: Int
|
||||
-- | Consequently, we expect *at least* an input of 250 bytes for public key, loosely leading
|
||||
-- | to accept key sizes of at least 2048 bits. Maximum allowed key size is also arbitrary.
|
||||
rsa_min_key_size = 250 :: Int
|
||||
rsa_max_key_size = 1000 :: Int
|
||||
|
||||
-- | Contrary to RSA, ED25519 doesn't use a PEM-converted PKCS representation to exchange
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue