mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Merge pull request #616 from plebbit/master
refactor(electron): change IPFS API port to 50019
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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'],
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user