mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
misc fixes
This commit is contained in:
@@ -181,7 +181,7 @@ export default class PortForwards {
|
||||
})
|
||||
|
||||
protected readonly forwards = toSignal<MappedForward[], []>(
|
||||
combineLatest([this.devices$, this.patch.watch$('port_forwards')]).pipe(
|
||||
combineLatest([this.devices$, this.patch.watch$('portForwards')]).pipe(
|
||||
map(([devices, forwards]) =>
|
||||
Object.entries(forwards).map(([source, target]) => {
|
||||
const sourceSplit = source.split(':')
|
||||
|
||||
@@ -23,8 +23,8 @@ export abstract class ApiService {
|
||||
abstract deleteDevice(params: DeleteDeviceReq): Promise<null> // device.remove
|
||||
abstract showDeviceConfig(params: DeleteDeviceReq): Promise<string> // device.show-config
|
||||
// forwards
|
||||
abstract addForward(params: AddForwardReq): Promise<null> // forward.add
|
||||
abstract deleteForward(params: DeleteForwardReq): Promise<null> // forward.remove
|
||||
abstract addForward(params: AddForwardReq): Promise<null> // port-forward.add
|
||||
abstract deleteForward(params: DeleteForwardReq): Promise<null> // port-forward.remove
|
||||
}
|
||||
|
||||
export type SubscribeRes = {
|
||||
|
||||
@@ -94,11 +94,11 @@ export class LiveApiService extends ApiService {
|
||||
// forwards
|
||||
|
||||
async addForward(params: AddForwardReq): Promise<null> {
|
||||
return this.rpcRequest({ method: 'forward.add', params })
|
||||
return this.rpcRequest({ method: 'port-forward.add', params })
|
||||
}
|
||||
|
||||
async deleteForward(params: DeleteForwardReq): Promise<null> {
|
||||
return this.rpcRequest({ method: 'forward.remove', params })
|
||||
return this.rpcRequest({ method: 'port-forward.remove', params })
|
||||
}
|
||||
|
||||
// private
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export type TunnelData = {
|
||||
wg: WgServer
|
||||
port_forwards: Record<string, string>
|
||||
portForwards: Record<string, string>
|
||||
}
|
||||
|
||||
export type WgServer = {
|
||||
@@ -35,7 +35,7 @@ export const mockTunnelData: TunnelData = {
|
||||
},
|
||||
},
|
||||
},
|
||||
port_forwards: {
|
||||
portForwards: {
|
||||
'69.1.1.42:443': '10.59.0.2:5443',
|
||||
'69.1.1.42:3000': '10.59.0.2:3000',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user