diff --git a/client/src/utils/free.jsx b/client/src/utils/free.jsx index f6c5bf0..b48e260 100644 --- a/client/src/utils/free.jsx +++ b/client/src/utils/free.jsx @@ -65,9 +65,9 @@ const PremiumSalesPage = ({salesKey, extra}) => { const discountedLifePrice = (lifePrice * 0.85).toFixed(2); - const monthlyLink = "https://buy.stripe.com/5kAbMN4qrbkVcBGcMR?prefilled_promo_code=EARLY15"; - const yearlyLink = "https://buy.stripe.com/cN2bMN9KLbkV59e9AE?prefilled_promo_code=EARLY15"; - const lifeLink = "https://buy.stripe.com/8wM1896yz74F59e6ov?prefilled_promo_code=LIFE15"; + const monthlyLink = "https://buy.stripe.com/5kAbMN4qrbkVcBGcMR"; + const yearlyLink = "https://buy.stripe.com/cN2bMN9KLbkV59e9AE"; + const lifeLink = "https://buy.stripe.com/8wM1896yz74F59e6ov"; const featureKeys = Array.from({ length: 6 }, (_, i) => `mgmt.sales.${salesKey}.features.${i}`); const planFeatureKeys = Array.from({ length: 5 }, (_, i) => `mgmt.sales.plan_features.${i}`); diff --git a/src/constellation/nebula.go b/src/constellation/nebula.go index 2d51ac6..80f1b58 100644 --- a/src/constellation/nebula.go +++ b/src/constellation/nebula.go @@ -941,21 +941,23 @@ func populateIPTableMasquerade() { utils.Error("Constellation: Failed to check existing iptables rules", err) // Continue anyway } - - // Remove rules with our comment marker from nat table (IP range might have changed) - cmd = exec.Command("sh", "-c", "iptables-save -t nat | grep 'COSMOS-CLOUD-EXIT-NODE' | grep '^-A' | sed 's/-A/-D/' | xargs -r -L1 iptables -t nat") - if err := cmd.Run(); err != nil { - utils.Error("Constellation: Error removing NAT rules", err) - } else { - utils.Log("Constellation: NAT rules removed") - } - // Remove rules with our comment marker from filter table - cmd = exec.Command("sh", "-c", "iptables-save | grep 'COSMOS-CLOUD-EXIT-NODE' | grep '^-A' | sed 's/-A/-D/' | xargs -r -L1 iptables") - if err := cmd.Run(); err != nil { - utils.Error("Constellation: Error removing FORWARD rules", err) - } else { - utils.Log("Constellation: FORWARD rules removed") + if strings.Contains(rules, "COSMOS-CLOUD-EXIT-NODE") { + // Remove rules with our comment marker from nat table (IP range might have changed) + cmd = exec.Command("sh", "-c", "iptables-save -t nat | grep 'COSMOS-CLOUD-EXIT-NODE' | grep '^-A' | sed 's/-A/-D/' | xargs -r -L1 iptables -t nat") + if err := cmd.Run(); err != nil { + utils.Error("Constellation: Error removing NAT rules", err) + } else { + utils.Log("Constellation: NAT rules removed") + } + + // Remove rules with our comment marker from filter table + cmd = exec.Command("sh", "-c", "iptables-save | grep 'COSMOS-CLOUD-EXIT-NODE' | grep '^-A' | sed 's/-A/-D/' | xargs -r -L1 iptables") + if err := cmd.Run(); err != nil { + utils.Error("Constellation: Error removing FORWARD rules", err) + } else { + utils.Log("Constellation: FORWARD rules removed") + } } // Add iptables rules with comment markers