Merge pull request #616 from plebbit/master

refactor(electron): change IPFS API port to 50019
This commit is contained in:
Tom (plebeius.eth)
2024-12-07 22:11:09 +01:00
committed by GitHub
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -168,7 +168,7 @@ const createMainWindow = () => {
let serializedUrl = '';
// make an exception for ipfs stats
if (validatedUrl.toString() === 'http://localhost:5001/webui/') {
if (validatedUrl.toString() === 'http://localhost:50019/webui/') {
serializedUrl = validatedUrl.toString();
} else if (validatedUrl.protocol === 'https:') {
// open serialized url to prevent remote execution
@@ -198,7 +198,7 @@ const createMainWindow = () => {
let serializedUrl = '';
// make an exception for ipfs stats
if (validatedUrl.toString() === 'http://localhost:5001/webui/') {
if (validatedUrl.toString() === 'http://localhost:50019/webui/') {
serializedUrl = validatedUrl.toString();
} else if (validatedUrl.protocol === 'https:') {
// open serialized url to prevent remote execution
+4 -4
View File
@@ -69,10 +69,10 @@ const startIpfs = async () => {
});
// use different port with proxy for debugging during env
let apiAddress = '/ip4/127.0.0.1/tcp/5001';
let apiAddress = '/ip4/127.0.0.1/tcp/50019';
if (isDev) {
apiAddress = apiAddress.replace('5001', '5002');
proxyServer.start({ proxyPort: 5001, targetPort: 5002 });
apiAddress = apiAddress.replace('50019', '50029');
proxyServer.start({ proxyPort: 50019, targetPort: 50029 });
}
await spawnAsync(ipfsPath, ['config', 'Addresses.API', apiAddress], { env, hideWindows: true });
@@ -116,7 +116,7 @@ const start = async () => {
}
pendingStart = true;
try {
const started = await tcpPortUsed.check(isDev ? 5002 : 5001, '127.0.0.1');
const started = await tcpPortUsed.check(isDev ? 50029 : 50019, '127.0.0.1');
if (started) {
return;
}
+1 -1
View File
@@ -14,7 +14,7 @@ const port = 9138;
const defaultPlebbitOptions = {
// find the user's OS data path
dataPath: !isDev ? envPaths.data : path.join(dirname, '..', '.plebbit'),
ipfsHttpClientsOptions: ['http://localhost:5001/api/v0'],
ipfsHttpClientsOptions: ['http://localhost:50019/api/v0'],
httpRoutersOptions: ['https://routing.lol', 'https://peers.pleb.bot'],
};
+1 -1
View File
@@ -176,7 +176,7 @@ export const Footer = () => {
v{packageJson.version}
</a>
{isElectron && (
<a className={styles.fullNodeStats} href='http://localhost:5001/webui/' target='_blank' rel='noreferrer'>
<a className={styles.fullNodeStats} href='http://localhost:50019/webui/' target='_blank' rel='noreferrer'>
node stats
</a>
)}