Skip to content

Commit

Permalink
Adding undici
Browse files Browse the repository at this point in the history
  • Loading branch information
kopiro committed Aug 2, 2024
1 parent 60fe319 commit ab139f7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
12 changes: 11 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@
},
"dependencies": {
"homebridge-camera-ffmpeg": "^3.1.4",
"onvif": "github:agsh/onvif"
"onvif": "github:agsh/onvif",
"undici": "^6.19.5"
},
"devDependencies": {
"@types/node": "^22.1.0",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"eslint": "^8.57.0",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
"homebridge": "^1.8.4",
"nodemon": "^3.1.4",
"rimraf": "^6.0.1",
Expand Down
6 changes: 4 additions & 2 deletions src/tapoCamera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type {
TAPOCameraResponseDeviceInfo,
TAPOCameraSetRequest,
} from "./types/tapo";
import { Agent } from "https";
import { Agent } from "undici";

const MAX_LOGIN_RETRIES = 3;
const AES_BLOCK_SIZE = 16;
Expand Down Expand Up @@ -50,7 +50,9 @@ export class TAPOCamera extends OnvifCamera {
super(log, config);

this.httpsAgent = new Agent({
rejectUnauthorized: false,
connect: {
rejectUnauthorized: false,
},
});

this.cnonce = this.generateCnonce();
Expand Down

0 comments on commit ab139f7

Please sign in to comment.