mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
Reverse port forwarding backend actually works now. UI needs some work for the "new vision".
This commit is contained in:
@@ -676,32 +676,26 @@ module.exports = function(options) {
|
||||
if (!data.targetHost || data.targetHost === 'localhost') {
|
||||
data.targetHost = socket.request.ip
|
||||
}
|
||||
dbapi.addUserForward(user.email, data)
|
||||
.then(function() {
|
||||
socket.emit('forward.create', data)
|
||||
joinChannel(responseChannel)
|
||||
push.send([
|
||||
channel
|
||||
, wireutil.transaction(
|
||||
responseChannel
|
||||
, new wire.ForwardCreateMessage(data)
|
||||
)
|
||||
])
|
||||
})
|
||||
socket.emit('forward.create', data)
|
||||
joinChannel(responseChannel)
|
||||
push.send([
|
||||
channel
|
||||
, wireutil.transaction(
|
||||
responseChannel
|
||||
, new wire.ForwardCreateMessage(data)
|
||||
)
|
||||
])
|
||||
})
|
||||
.on('forward.remove', function(channel, responseChannel, data) {
|
||||
dbapi.removeUserForward(user.email, data.devicePort)
|
||||
.then(function() {
|
||||
socket.emit('forward.remove', data)
|
||||
joinChannel(responseChannel)
|
||||
push.send([
|
||||
channel
|
||||
, wireutil.transaction(
|
||||
responseChannel
|
||||
, new wire.ForwardRemoveMessage(data)
|
||||
)
|
||||
])
|
||||
})
|
||||
socket.emit('forward.remove', data)
|
||||
joinChannel(responseChannel)
|
||||
push.send([
|
||||
channel
|
||||
, wireutil.transaction(
|
||||
responseChannel
|
||||
, new wire.ForwardRemoveMessage(data)
|
||||
)
|
||||
])
|
||||
})
|
||||
.on('logcat.start', function(channel, responseChannel, data) {
|
||||
joinChannel(responseChannel)
|
||||
|
||||
Reference in New Issue
Block a user