This commit is contained in:
parent
84ae0f6994
commit
1d36961a7c
16 changed files with 734 additions and 48 deletions
|
|
@ -53,7 +53,8 @@ func (b *Base) CacheDir() string { return b.cacheDir }
|
|||
func (b *Base) ConfigPath() string { return b.cfg.Path }
|
||||
func (b *Base) ConfigLoaded() bool { return b.cfg.Loaded }
|
||||
|
||||
// ProxyBin resolves the on-device MITM binary, relative paths against repo root.
|
||||
// ProxyBin resolves the on-device MITM binary. Empty means “auto” (caller uses
|
||||
// proxy.FindLocalBin — next to drm.exe, then repo bin/).
|
||||
func (b *Base) ProxyBin() string {
|
||||
if b.common.ProxyBin != "" {
|
||||
return modcfg.Resolve(b.common.ProxyBin)
|
||||
|
|
@ -67,7 +68,18 @@ func (b *Base) ProxyBin() string {
|
|||
return p
|
||||
}
|
||||
}
|
||||
return filepath.Join(root, "bin", "proxy-android-arm64")
|
||||
if exe, err := os.Executable(); err == nil {
|
||||
dir := filepath.Dir(exe)
|
||||
for _, p := range []string{
|
||||
filepath.Join(dir, "proxy-android-arm64"),
|
||||
filepath.Join(dir, "bin", "proxy-android-arm64"),
|
||||
} {
|
||||
if st, err := os.Stat(p); err == nil && !st.IsDir() {
|
||||
return p
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (b *Base) CAHash() string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue