Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import io from 'socket.io-client'
import feathers, { socketio, authentication } from '@feathersjs/client'
const socket = io(process.env.REACT_APP_API_SERVER, {
transports: ['websocket'],
forceNew: true,
})
const client = feathers()
client.configure(socketio(socket, { timeout: 10000 }))
client.configure(
authentication({
storage: window.localStorage,
entity: 'user',
service: 'users',
})
)
// Try to prevent login timeouts although I don't think it actually works
// TODO: investigate how to fix this
client.service('authentication').timeout = 20000
client.service('users').timeout = 20000
export const channels = client.service('api/channels')
export const posts = client.service('api/posts')
export const search = client.service('api/search')
export const follows = client.service('api/follows')
export const micropub = client.service('api/micropub')
export const users = client.service('users')
const feathers = require('@feathersjs/client');
const socketio = require('@feathersjs/socketio-client');
var path = require("path");
var fs = require("fs");
const io = require('socket.io-client');
var endpoint = process.argv[2] ? process.argv[2] : "http://127.0.0.1:3030";
const socket = io(endpoint);
const term = require("./term").term;
const app = feathers();
var nuages = {};
app.configure(feathers.authentication({}));
app.configure(feathers.socketio(socket));
nuages.implantService = app.service('implants');
nuages.jobService = app.service('jobs');
nuages.fsService = app.service('fs');
nuages.fileService = app.service('/fs/files');
nuages.chunkService = app.service('/fs/chunks');
nuages.modrunService = app.service('/modules/run');
nuages.moduleService = app.service('/modules');
nuages.modloadService = app.service('/modules/load');
nuages.fsService.timeout = 20000000;
nuages.chunkService.timeout = 20000000;
nuages.vars = {
implants: {},
paths:{},
import io from 'socket.io-client';
import feathers from '@feathersjs/client';
const socket = io('http://localhost:3030');
const client = feathers();
client.configure(feathers.socketio(socket));
client.configure(feathers.authentication({
storage: window.localStorage
}));
export default client;