Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
f41f49c2
Commit
f41f49c2
authored
Jan 03, 2025
by
DavidHuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据深度测试报告
1、网络代理 2、越狱机型检测
parent
ac70c7f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
YHHomeHoldViewPageViewController.swift
...Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
+16
-0
UIDevice+Extension.swift
...y/galaxy/Classes/Tools/Extention/UIDevice+Extension.swift
+48
-0
No files found.
galaxy/galaxy/Classes/Modules/Home(首页)/C/YHHomeHoldViewPageViewController.swift
View file @
f41f49c2
...
@@ -68,6 +68,22 @@ class YHHomeHoldViewPageViewController: YHBaseViewController, WKUIDelegate, WKNa
...
@@ -68,6 +68,22 @@ class YHHomeHoldViewPageViewController: YHBaseViewController, WKUIDelegate, WKNa
super
.
viewDidLoad
()
super
.
viewDidLoad
()
setupUI
()
setupUI
()
// getConfigData()
// getConfigData()
// if UIDevice.isUsedProxy() {
// YHHUD.flash(message: "有代理")
// } else {
// YHHUD.flash(message: "无代理")
// }
//
// if UIDevice.isJailbroken() {
// YHHUD.flash(message: "越狱")
// } else {
// YHHUD.flash(message: "未越狱")
// }
}
}
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
func
webView
(
_
webView
:
WKWebView
,
didFinish
navigation
:
WKNavigation
!
)
{
...
...
galaxy/galaxy/Classes/Tools/Extention/UIDevice+Extension.swift
View file @
f41f49c2
...
@@ -213,4 +213,52 @@ extension UIDevice {
...
@@ -213,4 +213,52 @@ extension UIDevice {
static
func
iPhoneVersion
()
->
String
{
static
func
iPhoneVersion
()
->
String
{
return
"iOS"
+
(
Device
.
current
.
systemVersion
??
""
)
return
"iOS"
+
(
Device
.
current
.
systemVersion
??
""
)
}
}
//判断 网络 是否设置了代理
public
class
func
isUsedProxy
()
->
Bool
{
guard
let
proxy
=
CFNetworkCopySystemProxySettings
()?
.
takeUnretainedValue
()
else
{
return
false
}
guard
let
dict
=
proxy
as?
[
String
:
Any
]
else
{
return
false
}
_
=
dict
.
isEmpty
// 有时候未设置代理dictionary也不为空,而是一个空字典
guard
let
HTTPProxy
=
dict
[
"HTTPProxy"
]
as?
String
else
{
return
false
}
if
(
HTTPProxy
.
count
>
0
)
{
return
true
}
return
false
}
//判断手机是否越狱
public
class
func
isJailbroken
()
->
Bool
{
let
fileManager
=
FileManager
.
default
let
pathsToCheck
=
[
"/Applications/Cydia.app"
,
"/private/var/lib/apt/"
,
"/private/var/lib/cydia/"
,
"/private/var/stash/"
,
"/private/var/tmp/cydia.log"
,
"/private/var/mobile/Library/Cydia/"
,
"/private/var/mobile/Library/MobileSubstrate/DynamicLibraries/"
,
"/private/var/mobile/bin/bash"
,
"/private/var/mobile/bin/sh"
,
"/private/var/mobile/bin/zsh"
,
"/private/var/mobile/usr/sbin/sshd"
,
"/private/var/mobile/usr/bin/sshd"
,
"/private/var/mobile/Media/Cydia"
,
"/private/var/root/Documents/Cydia"
,
"/private/var/tmp/cydia.log"
,
"/private/var/lib/dpkg/"
]
for
path
in
pathsToCheck
{
if
fileManager
.
fileExists
(
atPath
:
path
)
{
return
true
}
}
return
false
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment