Skip to content

Commit

Permalink
feat: export connect options vpn
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonornela committed May 11, 2020
1 parent b81a296 commit c2cc59d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface Options {
export interface ConnectOptions {
description: string;
protocol: 'ikev2';
server: string;
Expand Down
10 changes: 6 additions & 4 deletions src/vpn.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Config, Options } from './interfaces';
import { Config, ConnectOptions } from './interfaces';

const path = require('path'); // eslint-disable-line

Expand All @@ -9,7 +9,7 @@ export class Bridge {

private readonly config?: Config = {};

constructor(options: Options, config?: Config) {
constructor(options: ConnectOptions, config?: Config) {
this.config = config;

this.importFramework();
Expand Down Expand Up @@ -46,7 +46,7 @@ export class Bridge {
return this.vpnManager;
}

create(options: Options): this {
create(options: ConnectOptions): this {
const json = JSON.stringify(options);
this.vpnManager = $.VPNManager('alloc')('initWithJson', $(json));

Expand All @@ -63,5 +63,7 @@ export class Bridge {
}
}

export default (options: Options, config?: Config): Bridge =>
export default (options: ConnectOptions, config?: Config): Bridge =>
new Bridge(options, config);

export { ConnectOptions };

0 comments on commit c2cc59d

Please sign in to comment.