mirror of
https://github.com/Termix-SSH/Mobile.git
synced 2026-07-28 05:51:43 +02:00
0b6d9e8ea4
* feat: Add landscape laayout, file manager, and server stats (squash) * fix: Improve UI issues * feat: Greatly improve UI consistency, improve UI for all components (local squash) * feat: Improved file manager editor/styling * fix: Run npm linter and improve styling/UI bugs * feat: Fix tab bar height issues, and bein fixing terminal kb dismissal * fix: Fix the snippets bar visibility and general issues with landscape styling * chore: Format and clean up files * Update app.json * fix: Updated types * feat: Clean up files, add new termainl customization/tunnel system/new server stats (local squash commit) * feat: Add terminal customization, totp/auth dialog support, and overall UI improvements (local squash commit) * feat: Add auto mosh support * fix: HTTP issues on iOS * fix: increment ver * chore: Update readme * fix: iOS not loading HTTP hosts * feat: allow scrolling, backgrounddsiconnect fixes, http fixes, etc. * fix: Remove all bg conneciton bloat * fix: improve reocnnection logic * feat: improve copying and run cleanup * fix: http on ios * fix: http on ios * fix: build error with axios fetch * feat: improe scrolling and htpp on ios * fix: ios http * fix: ui issues + cleanup for release cantidate
54 lines
1.7 KiB
JavaScript
54 lines
1.7 KiB
JavaScript
const {withAndroidManifest, withDangerousMod} = require('@expo/config-plugins');
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
|
|
const withNetworkSecurityConfig = (config) => {
|
|
config = withAndroidManifest(config, async (config) => {
|
|
const mainApplication = config.modResults.manifest.application[0];
|
|
|
|
mainApplication.$['android:networkSecurityConfig'] = '@xml/network_security_config';
|
|
|
|
return config;
|
|
});
|
|
|
|
config = withDangerousMod(config, ['android', async (config) => {
|
|
const projectRoot = config.modRequest.projectRoot;
|
|
const resXmlPath = path.join(projectRoot, 'android', 'app', 'src', 'main', 'res', 'xml');
|
|
|
|
if (!fs.existsSync(resXmlPath)) {
|
|
fs.mkdirSync(resXmlPath, {recursive: true});
|
|
}
|
|
|
|
const networkSecurityConfigPath = path.join(resXmlPath, 'network_security_config.xml');
|
|
|
|
const networkSecurityConfig = `<?xml version="1.0" encoding="utf-8"?>
|
|
<network-security-config>
|
|
<base-config cleartextTrafficPermitted="true">
|
|
<trust-anchors>
|
|
<certificates src="system" />
|
|
<certificates src="user" />
|
|
</trust-anchors>
|
|
</base-config>
|
|
|
|
<domain-config cleartextTrafficPermitted="true">
|
|
<domain includeSubdomains="true">localhost</domain>
|
|
<domain includeSubdomains="true">127.0.0.1</domain>
|
|
<domain includeSubdomains="true">10.0.2.2</domain>
|
|
<trust-anchors>
|
|
<certificates src="system" />
|
|
<certificates src="user" />
|
|
</trust-anchors>
|
|
</domain-config>
|
|
</network-security-config>
|
|
`;
|
|
|
|
fs.writeFileSync(networkSecurityConfigPath, networkSecurityConfig);
|
|
|
|
return config;
|
|
},]);
|
|
|
|
return config;
|
|
};
|
|
|
|
module.exports = withNetworkSecurityConfig;
|