mirror of
https://github.com/openstf/stf
synced 2025-10-04 18:29:17 +02:00
Reverse port forwarding backend actually works now. UI needs some work for the "new vision".
This commit is contained in:
parent
d55ccebdc5
commit
617e20522b
10 changed files with 395 additions and 195 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue