mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-04 06:19:46 +00:00
feat: Utils to do bindLan and have ipv4 and ipv6 if need be
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { Effects } from "../types";
|
||||
import { TorBinding } from "./TorBinding";
|
||||
import { Effects } from "../types"
|
||||
import { TorBinding } from "./TorBinding"
|
||||
|
||||
export class TorHostname {
|
||||
constructor(readonly effects: Effects, readonly id: string) {}
|
||||
static of(effects: Effects, id: string) {
|
||||
return new TorHostname(effects, id);
|
||||
return new TorHostname(effects, id)
|
||||
}
|
||||
async bindTor(internalPort: number, externalPort: number) {
|
||||
const address = await this.effects.bindTor({
|
||||
internalPort,
|
||||
name: this.id,
|
||||
externalPort,
|
||||
});
|
||||
return new TorBinding(address);
|
||||
})
|
||||
return new TorBinding(address)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user