chore: Make SubScriptioninfo query also follow Proxy

This commit is contained in:
xishang0128
2024-04-12 04:58:07 +08:00
parent 91a7ffaad2
commit e3b69b8ae2
3 changed files with 13 additions and 4 deletions

View File

@@ -28,6 +28,10 @@ func (f *FileVehicle) Read() ([]byte, error) {
return os.ReadFile(f.path)
}
func (f *FileVehicle) Proxy() string {
return ""
}
func NewFileVehicle(path string) *FileVehicle {
return &FileVehicle{path: path}
}
@@ -51,6 +55,10 @@ func (h *HTTPVehicle) Path() string {
return h.path
}
func (h *HTTPVehicle) Proxy() string {
return h.proxy
}
func (h *HTTPVehicle) Read() ([]byte, error) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*20)
defer cancel()