Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ulixee
GitHub Repository: ulixee/secret-agent
Path: blob/main/plugins/default-browser-emulator/interfaces/IBrowserData.ts
1029 views
1
import IUserAgentOption from '@secret-agent/interfaces/IUserAgentOption';
2
import IBrowserEngineOption from '@secret-agent/interfaces/IBrowserEngineOption';
3
4
export default interface IBrowserData
5
extends Omit<IDataCore, 'browserEngineOptions' | 'userAgentOptions'> {
6
browserConfig: IDataBrowserConfig;
7
clienthello: IDataClienthello;
8
codecs: IDataCodecs;
9
windowChrome: IDataWindowChrome;
10
windowFraming: IDataWindowFraming;
11
windowNavigator: IDataWindowNavigator;
12
http2Settings: IDataHttp2Settings;
13
domPolyfill: IDataDomPolyfill;
14
windowBaseFraming: IDataWindowFraming;
15
headers: IDataHeaders;
16
}
17
18
export interface IDataBrowserConfig {
19
defaultLocale: string;
20
features: string[];
21
}
22
23
export interface IDataWindowNavigator {
24
navigator: any;
25
}
26
27
export interface IDataDomPolyfill {
28
add: any[];
29
remove: any[];
30
modify: any[];
31
reorder: any[];
32
}
33
34
export interface IDataWindowChrome {
35
chrome: any;
36
prevProperty: string;
37
}
38
39
export interface IDataClienthello {
40
version: string;
41
ciphers: any[];
42
compressionMethods: any[];
43
extensions: any[];
44
}
45
46
export interface IDataCodecs {
47
audioSupport: any;
48
videoSupport: any;
49
webRtcAudioCodecs: any;
50
webRtcVideoCodecs: any;
51
}
52
53
export interface IDataHttp2Settings {
54
settings: any;
55
ping: string;
56
initialWindowSize: number;
57
firstFrameWindowSize: number;
58
}
59
60
export interface IDataCore {
61
pkg: any;
62
browserEngineOptions: IDataBrowserEngineOptions;
63
userAgentOptions: IDataUserAgentOptions;
64
}
65
66
export type IDataBrowserEngineOptions = IBrowserEngineOption[];
67
export type IDataUserAgentOptions = IDataUserAgentOption[];
68
69
export interface IDataUserAgentOption extends Omit<IUserAgentOption, 'string'> {
70
string?: string;
71
strings?: string[];
72
}
73
74
export interface IDataHeaders {
75
[protocol: string]: {
76
[resourceType: string]: IDataHeaderOrder[];
77
};
78
}
79
80
export interface IDataHeaderOrder {
81
originTypes: string[];
82
method: string;
83
order: string[];
84
defaults: { [header: string]: string[] };
85
orderKeys?: Set<string>; // constructed as accessed
86
}
87
88
export interface IDataWindowFraming {
89
screenGapLeft: number;
90
screenGapTop: number;
91
screenGapRight: number;
92
screenGapBottom: number;
93
frameBorderWidth: number;
94
frameBorderHeight: number;
95
}
96
97