mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-26 10:21:55 +00:00
15 lines
394 B
TypeScript
15 lines
394 B
TypeScript
import { Effects } from "../types";
|
|
import { TorBinding } from "./TorBinding";
|
|
|
|
export class TorHostname {
|
|
constructor(readonly id: string, readonly effects: Effects) {}
|
|
async bindTor(internalPort: number, externalPort: number) {
|
|
const address = await this.effects.bindTor({
|
|
internalPort,
|
|
name: this.id,
|
|
externalPort,
|
|
});
|
|
return new TorBinding(address);
|
|
}
|
|
}
|