diff --git a/changelog.md b/changelog.md index dad2c42..fb71690 100644 --- a/changelog.md +++ b/changelog.md @@ -1,8 +1,11 @@ -## Version 0.9.1 > 0.9.4 +## Version 0.9.1 > 0.9.5 - Fix subdomain logic for composed TLDs + - Add option for custom wildcard domains - Fix domain depupe logic + - Add import button in market - Update LEGO - Fix issue with hot-reloading between HTTP and HTTPS + - Fix loading bar in container overview page ## Version 0.9.0 - Rewrote the entire HTTPS / DNS challenge system to be more robust and easier to use diff --git a/client/src/pages/authentication/auth-forms/AuthRegister.jsx b/client/src/pages/authentication/auth-forms/AuthRegister.jsx index 452a294..688aae7 100644 --- a/client/src/pages/authentication/auth-forms/AuthRegister.jsx +++ b/client/src/pages/authentication/auth-forms/AuthRegister.jsx @@ -73,7 +73,7 @@ const AuthRegister = ({nickname, isRegister, isInviteLink, regkey}) => { .max(255) .required('Password is required') .matches( - /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@#$%\^&\*\(\)_\+=\-\{\[\}\]:;"'<,>\.\?\/])(?=.{9,})/, + /^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@#$%\^&\*\(\)_\+=\-\{\[\}\]:;"'<,>\.\/])(?=.{9,})/, 'Must Contain 9 Characters, One Uppercase, One Lowercase, One Number and one special case Character (~!@#$%^&*()_+=-{[}]:;"\'<>.?/)' ), })} diff --git a/client/src/pages/config/users/configman.jsx b/client/src/pages/config/users/configman.jsx index 7957b90..c7155aa 100644 --- a/client/src/pages/config/users/configman.jsx +++ b/client/src/pages/config/users/configman.jsx @@ -90,6 +90,7 @@ const ConfigManagement = () => { DNSChallengeProvider: config.HTTPConfig.DNSChallengeProvider, DNSChallengeConfig: config.HTTPConfig.DNSChallengeConfig, ForceHTTPSCertificateRenewal: config.HTTPConfig.ForceHTTPSCertificateRenewal, + OverrideWildcardDomains: config.HTTPConfig.OverrideWildcardDomains, Email_Enabled: config.EmailConfig.Enabled, Email_Host: config.EmailConfig.Host, @@ -136,6 +137,7 @@ const ConfigManagement = () => { DNSChallengeProvider: values.DNSChallengeProvider, DNSChallengeConfig: values.DNSChallengeConfig, ForceHTTPSCertificateRenewal: values.ForceHTTPSCertificateRenewal, + OverrideWildcardDomains: values.OverrideWildcardDomains.replace(/\s/g, ''), }, EmailConfig: { ...config.EmailConfig, @@ -552,6 +554,19 @@ const ConfigManagement = () => { formik={formik} /> + {formik.values.UseWildcardCertificate && ( + { + formik.setFieldValue("ForceHTTPSCertificateRenewal", true); + }} + label="(optional) Override Wildcard Domains (comma separated, need to add both wildcard AND root domain like in the placeholder)" + formik={formik} + placeholder={"example.com,*.example.com"} + /> + )} + + {formik.values.HTTPSCertificateMode === "LETSENCRYPT" && ( 1 ? ( { - screenshots.map((item, i) => ) + screenshots.map((item, i) => ) } ) - : + : } function Showcases({ showcase, isDark }) { @@ -34,14 +35,14 @@ function Showcases({ showcase, isDark }) { function ShowcasesItem({ isDark, item }) { return ( - + - -

{item.name}

+ +

{item.name}

- +
{ backgroundColor: 'rgba(0,0,0,0.5)', }}> + style={{ + position: 'fixed', + top: 0, + left: 0, + width: '100%', + height: '100%', + }}> - - + { -
+
@@ -197,17 +198,17 @@ const MarketPage = () => {
repository: {openedApp.repository}
image: {openedApp.image}
compose: {openedApp.compose}
-
+
- +
} - + {(!showcase || !Object.keys(showcase).length) && { justifyContent: 'center', }}> } - {showcase && showcase.length > 0 && } + {showcase && showcase.length > 0 && } { padding: '24px', }}>

Applications

- - - - } - onChange={(e) => { - setSearch(e.target.value); - }} - /> + + + + + } + onChange={(e) => { + setSearch(e.target.value); + }} + /> + + + } + >Start ServApp + + { }} /> + {(!apps || !Object.keys(apps).length) && { marginTop: '150px', }}> } {apps && Object.keys(apps).length > 0 && {Object.keys(apps).map(appstore => apps[appstore] - .filter((app) => { - if (!search || search.length <= 2) { - return true; - } - return app.name.toLowerCase().includes(search.toLowerCase()) || - app.tags.join(' ').toLowerCase().includes(search.toLowerCase()); + .filter((app) => { + if (!search || search.length <= 2) { + return true; + } + return app.name.toLowerCase().includes(search.toLowerCase()) || + app.tags.join(' ').toLowerCase().includes(search.toLowerCase()); }) - .map((app) => { - return -
- - - -
{app.name}
-
{app.description}
- -
{app.tags.slice(0,3).join(", ")}
+ .map((app) => { + return +
+ + + +
{app.name}
+
{app.description}
+ +
{app.tags.slice(0, 3).join(", ")}
+
+
- - -
+
- -
- }))} + +
+ }))} }
diff --git a/client/src/pages/newInstall/newInstall.jsx b/client/src/pages/newInstall/newInstall.jsx index 3ae4f24..24bced7 100644 --- a/client/src/pages/newInstall/newInstall.jsx +++ b/client/src/pages/newInstall/newInstall.jsx @@ -485,7 +485,7 @@ const NewInstall = () => { // nickname cant be admin or root nickname: Yup.string().required('Nickname is required').min(3).max(32) .matches(/^(?!admin|root).*$/, 'Nickname cannot be admin or root'), - password: Yup.string().required('Password is required').min(8).max(128).matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@#$%\^&\*\(\)_\+=\-\{\[\}\]:;"'<,>\.\?\/])(?=.{9,})/, 'Password must contain 9 characters: at least 1 lowercase, 1 uppercase, 1 number, and 1 special character'), + password: Yup.string().required('Password is required').min(8).max(128).matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@#$%\^&\*\(\)_\+=\-\{\[\}\]:;"'<,>\.\/])(?=.{9,})/, 'Password must contain 9 characters: at least 1 lowercase, 1 uppercase, 1 number, and 1 special character'), email: Yup.string().email('Must be a valid email').max(255), confirmPassword: Yup.string().oneOf([Yup.ref('password'), null], 'Passwords must match'), })} diff --git a/client/src/pages/servapps/containers/docker-compose.jsx b/client/src/pages/servapps/containers/docker-compose.jsx index 25ddbaf..8c8b862 100644 --- a/client/src/pages/servapps/containers/docker-compose.jsx +++ b/client/src/pages/servapps/containers/docker-compose.jsx @@ -496,9 +496,7 @@ const DockerComposeImport = ({ refresh, dockerComposeInit, installerInit, defaul {step === 0 && !installer && <> - }> - This is an experimental feature. It is recommended to use with caution. Please report any issue you find! - + refresh().then(() => { + let refreshAll = refresh ? (() => refresh().then(() => { setIsUpdating(false); - })); + })) : (() => {setIsUpdating(false);}); const updateRoutes = (newRoute) => { API.config.addRoute(newRoute).then(() => { @@ -95,6 +95,7 @@ const ContainerOverview = ({ containerInfo, config, refresh, updatesAvailable, s image={Image} state={State.Status} refreshServApps={() => { + setIsUpdating(false); refreshAll() }} setIsUpdatingId={() => { diff --git a/package.json b/package.json index 13b70c3..d014f54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cosmos-server", - "version": "0.9.4", + "version": "0.9.5", "description": "", "main": "test-server.js", "bugs": { diff --git a/src/utils/types.go b/src/utils/types.go index 1849d27..a71061f 100644 --- a/src/utils/types.go +++ b/src/utils/types.go @@ -119,6 +119,7 @@ type HTTPConfig struct { Hostname string `validate:"required,excludesall=0x2C/ "` SSLEmail string `validate:"omitempty,email"` UseWildcardCertificate bool + OverrideWildcardDomains string `validate:"omitempty,excludesall=/ "` AcceptAllInsecureHostname bool DNSChallengeConfig map[string]string `json:"DNSChallengeConfig,omitempty"` } diff --git a/src/utils/utils.go b/src/utils/utils.go index a217ee2..9b71cc1 100644 --- a/src/utils/utils.go +++ b/src/utils/utils.go @@ -330,6 +330,7 @@ func LetsEncryptValidOnly(hostnames []string, acceptWildcard bool) []string { func GetAllHostnames(applyWildCard bool, removePorts bool) []string { mainHostname := GetMainConfig().HTTPConfig.Hostname + OverrideWildcardDomains := GetMainConfig().HTTPConfig.OverrideWildcardDomains if removePorts { mainHostname = strings.Split(mainHostname, ":")[0] @@ -370,6 +371,10 @@ func GetAllHostnames(applyWildCard bool, removePorts bool) []string { "*." + bareMainHostname, } + if(OverrideWildcardDomains != "") { + filteredHostnames = strings.Split(OverrideWildcardDomains, ",") + } + for _, hostname := range uniqueHostnames { if hostname != bareMainHostname && !strings.HasSuffix(hostname, "." + bareMainHostname) { filteredHostnames = append(filteredHostnames, hostname)