mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-05-12 06:39:42 -05:00
[release] v0.21.0-unstable96
This commit is contained in:
@@ -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}`);
|
||||
|
||||
+16
-14
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user