-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
90 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,155 +128,94 @@ | |
<h1>Configuration Profile Generator</h1> | ||
<!-- Add form for configuration generator --> | ||
<form> | ||
<!-- APN --> | ||
<div class="mb-3"> | ||
<label for="apn" class="form-label apn">APN:</label> | ||
<div id="apn-inputs"> | ||
<select id="apn" class="form-select"> | ||
<option value="">Automatic</option> | ||
<option value="mcinet" data-carrier="mcinet">MCI</option> | ||
<option value="irancell" data-carrier="irancell">Irancell</option> | ||
<option value="rightel" data-carrier="rightel">RighTel</option> | ||
</select> | ||
<div class="form-text">Select the APN (Access Point Name) for your carrier. The default option is "Automatic", which will automatically select the APN based on your carrier.</div> | ||
</div> | ||
<div class="form-check"> | ||
<input type="checkbox" id="apn-toggle" class="form-check-input"> | ||
<label for="apn-toggle" class="form-check-label">Include APN in profile</label> | ||
</div> | ||
</div> | ||
|
||
<!-- VPN --> | ||
<div class="mb-3"> | ||
<label for="vpn_server" class="form-label vpn">VPN Server (optional):</label> | ||
<div id="vpn-inputs"> | ||
<input type="text" id="vpn_server" class="form-control"> | ||
<div class="form-text">Enter the hostname or IP address of your VPN server if you want to use a VPN connection. Leave this field blank if you don't want to use a VPN.</div> | ||
|
||
<label for="vpn_username" class="form-label vpn">VPN Username (optional):</label> | ||
<input type="text" id="vpn_username" class="form-control"> | ||
<div class="form-text">Enter your VPN username if you want to use a VPN connection. Leave this field blank if you don't want to use a VPN.</div> | ||
|
||
<label for="vpn_password" class="form-label vpn">VPN Password (optional):</label> | ||
<input type="password" id="vpn_password" class="form-control"> | ||
<div class="form-text">Enter your VPN password if you want to use a VPN connection. Leave this field blank if you don't want to use a VPN.</div> | ||
</div> | ||
<div class="form-check"> | ||
<input type="checkbox" id="vpn-toggle" class="form-check-input"> | ||
<label for="vpn-toggle" class="form-check-label">Include VPN in profile</label> | ||
</div> | ||
</div> | ||
|
||
<!-- Proxy --> | ||
<div class="mb-3"> | ||
<label for="proxy_server" class="form-label proxy">Proxy Server (optional):</label> | ||
<div id="proxy-inputs"> | ||
<input type="text" id="proxy_server" class="form-control"> | ||
<div class="form-text">Enter the hostname or IP address of your proxy server if you want to use a proxy connection. Leave this field blank if you don't want to use a proxy.</div> | ||
|
||
<label for="proxy_port" class="form-label proxy">Proxy Port (optional):</label> | ||
<input type="text" id="proxy_port" class="form-control"> | ||
<div class="form-text">Enter the port number of your proxy server if you want to use a proxy connection. Leave this field blank if you don't want to use a proxy.</div> | ||
</div> | ||
<div class="form-check"> | ||
<input type="checkbox" id="proxy-toggle" class="form-check-input"> | ||
<label for="proxy-toggle" class="form-check-label">Include Proxy in profile</label> | ||
</div> | ||
</div> | ||
|
||
<!-- DNS --> | ||
<div class="mb-3"> | ||
<label for="dns_server" class="form-label dns">DNS Server (optional):</label> | ||
<div id="dns-inputs"> | ||
<input type="text" id="dns_server" class="form-control" value="8.8.8.8"> | ||
<div class="form-text">Enter the hostname or IP address of your DNS server if you want to use a custom DNS server. Leave this field blank to use the default DNS server for your carrier.</div> | ||
</div> | ||
<div class="form-check"> | ||
<input type="checkbox" id="dns-toggle" class="form-check-input"> | ||
<label for="dns-toggle" class="form-check-label">Include DNS in profile</label> | ||
</div> | ||
</div> | ||
|
||
<!-- Cloudflare --> | ||
<div class="mb-3"> | ||
<label for="cloudflare_domain" class="form-label cloudflare">Cloudflare Domain (optional):</label> | ||
<div id="cloudflare-inputs"> | ||
<input type="text" id="cloudflare_domain" class="form-control"> | ||
<div class="form-text">Enter the domain name for your Cloudflare account if you want to use Cloudflare's DNS servers. Leave this field blank if you don't want to use Cloudflare's DNS servers.</div> | ||
</div> | ||
<div class="form-check"> | ||
<input type="checkbox" id="cloudflare-toggle" class="form-check-input"> | ||
<label for="cloudflare-toggle" class="form-check-label">Include Cloudflare in profile</label> | ||
</div> | ||
</div> | ||
|
||
<!-- Additional options --> | ||
<div class="mb-3 form-check"> | ||
<input type="checkbox" id="enable_vpn" class="form-check-input"> | ||
<label for="enable_vpn" class="form-check-label">Enable VPN by default</label> | ||
<div class="form-text">Check this box if you want the VPN connection to be enabled by default when you install the configuration profile. Leave this box unchecked if you want to manually enable the VPN connection.</div> | ||
</div> | ||
<div class="mb-3 form-check"> | ||
<input type="checkbox" id="enable_proxy" class="form-check-input"> | ||
<label for="enable_proxy" class="form-check-label">Enable proxy by default</label> | ||
<div class="form-text">Check this box if you want the proxy connection to be enabled by default when you install the configuration profile. Leave this box unchecked if you want to manually enable the proxy connection.</div> | ||
</div> | ||
<div class="mb-3 form-check"> | ||
<input type="checkbox" id="remove_configuration" class="form-check-input"> | ||
<label for="remove_configuration" class="form-check-label">Remove configuration profile after uninstalling</label> | ||
<div class="form-text">Check this box if you want the configuration profile to be removed from your device when you uninstall the app. Leave this box unchecked if you want the configuration profile to remain on your device after uninstalling the app.</div> | ||
</div> | ||
|
||
<button type="submit" class="btn btn-primary">Generate Configuration Profile</button> | ||
</form> | ||
<div class="form-group"> | ||
<label for="carrier">Carrier:</label> | ||
<select id="carrier" class="form-control" required> | ||
<option value="">Select a carrier</option> | ||
<option value="mcinet">MCI</option> | ||
<option value="irancell">Irancell</option> | ||
<option value="rightel">RighTel</option> | ||
</select> | ||
</div> | ||
<div class="form-group"> | ||
<label for="apn">APN:</label> | ||
<input type="text" id="apn" class="form-control" required> | ||
</div> | ||
<div class="form-group"> | ||
<label for="dns">DNS:</label> | ||
<input type="text" id="dns" class="form-control" required> | ||
</div> | ||
<div class="form-group"> | ||
<div class="form-check"> | ||
<input type="checkbox" id="vpn" class="form-check-input"> | ||
<label for="vpn" class="form-check-label">VPN:</label> | ||
</div> | ||
|
||
<!-- Add Bootstrap JS CDN --> | ||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz4fnFO9gybBud7TlRbs/ic4AwGcFZOxg5DpPt8EgeUIgIwzjWfXQKWA4" crossorigin="anonymous"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cn7l7gDp0eyniUwwAZgrzD06kc/tftFf19TOAs2zVinnD/C7E91j9yyk5//jjpt/" crossorigin="anonymous"></script> | ||
|
||
<!-- Add custom JavaScript --> | ||
<script> | ||
const apnToggle = document.getElementById('apn-toggle'); | ||
const apnInputs = document.getElementById('apn-inputs'); | ||
|
||
apnToggle.addEventListener('change', () => { | ||
if (apnToggle.checked) { | ||
apnInputs.style.display = 'block'; | ||
} else { | ||
apnInputs.style.display = 'none'; | ||
} | ||
}); | ||
|
||
// Hide the inputs by default | ||
apnInputs.style.display = 'none'; | ||
|
||
const vpnToggle = document.getElementById('vpn-toggle'); | ||
const vpnInputs = document.getElementById('vpn-inputs'); | ||
|
||
vpnToggle.addEventListener('change', () => { | ||
if (vpnToggle.checked) { | ||
vpnInputs.style.display = 'block'; | ||
} else { | ||
vpnInputs.style.display = 'none'; | ||
} | ||
}); | ||
|
||
// Hide the inputs by default | ||
vpnInputs.style.display = 'none'; | ||
|
||
const proxyToggle = document.getElementById('proxy-toggle'); | ||
const proxyInputs = document.getElementById('proxy-inputs'); | ||
|
||
proxyToggle.addEventListener('change', () => { | ||
if (proxyToggle.checked) { | ||
proxyInputs.style.display = 'block'; | ||
} else { | ||
proxyInputs.style.display = 'none'; | ||
} | ||
}); | ||
|
||
// Hide the inputs by default | ||
proxyInputs.style.display = 'none'; | ||
|
||
const dnsToggle = document.getElementById('dns-toggle'); | ||
<div class="vpn-options" style="display:none;"> | ||
<label for="vpn_server">VPN Server:</label> | ||
<input type="text" id="vpn_server" class="form-control"> | ||
<label for="vpn_username">VPN Username:</label> | ||
<input type="text" id="vpn_username" class="form-control"> | ||
<label for="vpn_password">VPN Password:</label> | ||
<input type="password" id="vpn_password" class="form-control"> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<div class="form-check"> | ||
<input type="checkbox" id="proxy" class="form-check-input"> | ||
<label for="proxy" class="form-check-label">Proxy:</label> | ||
</div> | ||
<div class="proxy-options" style="display:none;"> | ||
<label for="proxy_server">Proxy Server:</label> | ||
<input type="text" id="proxy_server" class="form-control"> | ||
<label for="proxy_port">Proxy Port:</label> | ||
<input type="number" id="proxy_port" class="form-control"> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<div class="form-check"> | ||
<input type="checkbox" id="cloudflare" class="form-check-input"> | ||
<label for="cloudflare" class="form-check-label">Cloudflare Domain:</label> | ||
</div> | ||
<div class="cloudflare-options" style="display:none;"> | ||
<label for="cloudflare_domain">Cloudflare Domain:</label> | ||
<input type="text" id="cloudflare_domain" class="form-control"> | ||
</div> | ||
</div> | ||
<div class="form-group"> | ||
<label for="signalbooster">Signal Booster:</label> | ||
<input type="text" id="signalbooster" class="form-control" value="True" readonly> | ||
</div> | ||
<button type="submit" class="btn btn-primary">Generate Configuration Profile</button> | ||
</form> | ||
|
||
<script> | ||
// Show/hide VPN options when VPN checkbox is clicked | ||
document.getElementById('vpn').addEventListener('click', function() { | ||
document.querySelector('.vpn-options').style.display = this.checked ? 'block' : 'none'; | ||
}); | ||
|
||
// Show/hide proxy options when proxy checkbox is clicked | ||
document.getElementById('proxy').addEventListener('click', function() { | ||
document.querySelector('.proxy-options').style.display = this.checked ? 'block' : 'none'; | ||
}); | ||
|
||
// Show/hide Cloudflare options when Cloudflare checkbox is clicked | ||
document.getElementById('cloudflare').addEventListener('click', function() { | ||
document.querySelector('.cloudflare-options').style.display = this.checked ? 'block' : 'none'; | ||
}); | ||
|
||
// Handle form submission | ||
document.querySelector('form').addEventListener('submit', function(event) { | ||
event.preventDefault(); | ||
|
||
// Get form values | ||
const carrier = document.getElementById('carrier').value; | ||
const apn = document.getElementById('apn').value; | ||
const dns = document.getElementById('dns').value; | ||
const vpn = document.getElementById('vpn').checked; | ||
const vpn_server = document.getElementById('vpn_server').value; | ||
const vpn_username = document.getElementById('vpn_username').value; | ||
const vpn_password = document.getElementById('vpn_password').value; | ||
const proxy = document.getElementById('proxy').checked; | ||
const proxy_server = document.getElementById('proxy_server').value; | ||
const proxy_port = document.getElementById('proxy_port').value; |