diff --git a/agent/src/Lib/External/AppManifest.hs b/agent/src/Lib/External/AppManifest.hs index 5e9bafbc2..158e3b2b4 100644 --- a/agent/src/Lib/External/AppManifest.hs +++ b/agent/src/Lib/External/AppManifest.hs @@ -137,7 +137,7 @@ instance FromJSON LanConfiguration where standard = withText "Standard Lan" \t -> if t == "standard" then pure Standard else fail "Not Standard Lan Conf" custom = withObject "Custom Lan" $ \o -> do - Custom <$> o .: "port" + Custom <$> (o .: "custom" >>= (.: "port")) data PortMapEntry = PortMapEntry { portMapEntryInternal :: Word16 , portMapEntryTor :: Word16 diff --git a/agent/test/Lib/External/AppManifestSpec.hs b/agent/test/Lib/External/AppManifestSpec.hs index c0448cffe..c8d4a9fc0 100644 --- a/agent/test/Lib/External/AppManifestSpec.hs +++ b/agent/test/Lib/External/AppManifestSpec.hs @@ -87,6 +87,11 @@ ports: - internal: 80 tor: 80 lan: standard + - internal: 443 + tor: 443 + lan: + custom: + port: 443 - internal: 3000 tor: 3000 lan: ~