[//]:#DisplayInOneLine # 开发流程 ## step1:准备开发环境 任意文本编辑器,建议为vscode ## step2:选择使用的传输配置方式 ``` let config_read_type = 'websocket';//local,file,websocket,http ``` 可选择使用本地缓存、文件、websocket、http等方式读取配置信息 ## step3:若使用websocket方式,需要配置websocket服务器地址 ``` const wsUrl = 'ws://127.0.0.1:9002'; ``` ## step4:通过websocket方式的交互过程如下 发送获取config请求 ``` {"messageType":131073} ``` 返回对应的config信息 ``` { "debug_mode" : true, "format_version" : "1.1", "headers" : [ { "action" : "add", "apply_on" : "req", "comment" : "test", "header_name" : "VTM_terminalno", "header_value" : "7555980277", "status" : "on", "url_contains" : "" } ], "target_page" : "", "use_url_contains" : false } ``` # 开发要求 ## 集成方式 在默认chrome浏览器中,通过chrome extension的方式集成到chrome浏览器中 以命令行的方式启动,如: C:\Program Files\Google\Chrome\Application\chrome.exe --load-extension=D:\addin\res\VTMModifyHeaders ## 支持操作系统 windows、linux、macos ## 支持语言 javascript