├── .github ├── Download_on_the_App_Store_Badge.svg ├── image1.PNG ├── image2.PNG ├── image3.PNG └── workflows │ └── xcode.yml ├── .gitignore ├── DNS Configurator.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── takahiko.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── DNS Configurator ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x-1.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x-1.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x-1.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── Contents.json ├── DNS Configurator.entitlements ├── DNS_ConfiguratorApp.swift ├── Info.plist ├── Model │ └── DoHConfig.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Store │ └── DNSSettings.swift └── View │ ├── ContentView.swift │ ├── DoHConfigDetailView.swift │ ├── DoHConfigListView.swift │ ├── DoHConfigView.swift │ ├── DoHStatusView.swift │ ├── OptionsView.swift │ └── UsageModalView.swift ├── DNS ConfiguratorTests ├── DNS_ConfiguratorTests.swift └── Info.plist ├── DNS ConfiguratorUITests ├── DNS_ConfiguratorUITests.swift └── Info.plist ├── PRIVACY.md └── README.md /.github/Download_on_the_App_Store_Badge.svg: -------------------------------------------------------------------------------- 1 | 2 | Download_on_the_App_Store_Badge_US-UK_RGB_blk_4SVG_092917 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /.github/image1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/.github/image1.PNG -------------------------------------------------------------------------------- /.github/image2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/.github/image2.PNG -------------------------------------------------------------------------------- /.github/image3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/.github/image3.PNG -------------------------------------------------------------------------------- /.github/workflows/xcode.yml: -------------------------------------------------------------------------------- 1 | name: Swift 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: macos-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Build 17 | run: xcodebuild CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -scheme "DNS Configurator" build 18 | # TODO: Enable when macos-11 become available 19 | # - name: Run tests 20 | # run: xcodebuild CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -scheme "DNS Configurator" test 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /DNS Configurator.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A936587E2516F93100402DA5 /* DNS_ConfiguratorApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A936587D2516F93100402DA5 /* DNS_ConfiguratorApp.swift */; }; 11 | A93658802516F93100402DA5 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A936587F2516F93100402DA5 /* ContentView.swift */; }; 12 | A93658822516F93300402DA5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A93658812516F93300402DA5 /* Assets.xcassets */; }; 13 | A93658852516F93300402DA5 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A93658842516F93300402DA5 /* Preview Assets.xcassets */; }; 14 | A93658902516F93300402DA5 /* DNS_ConfiguratorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A936588F2516F93300402DA5 /* DNS_ConfiguratorTests.swift */; }; 15 | A936589B2516F93300402DA5 /* DNS_ConfiguratorUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A936589A2516F93300402DA5 /* DNS_ConfiguratorUITests.swift */; }; 16 | A93658AE2516F96600402DA5 /* NetworkExtension.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A93658AD2516F96600402DA5 /* NetworkExtension.framework */; }; 17 | A9833DEE2517336700DA388F /* DoHConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9833DED2517336700DA388F /* DoHConfig.swift */; }; 18 | A9833DF9251735AC00DA388F /* DoHConfigDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9833DF8251735AC00DA388F /* DoHConfigDetailView.swift */; }; 19 | A9D0AEA92518740E001F3547 /* DoHConfigView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D0AEA82518740E001F3547 /* DoHConfigView.swift */; }; 20 | A9D0AEAE25188F7A001F3547 /* DoHStatusView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D0AEAD25188F7A001F3547 /* DoHStatusView.swift */; }; 21 | A9D0AEB725189F63001F3547 /* DNSSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D0AEB625189F63001F3547 /* DNSSettings.swift */; }; 22 | A9D0AEBF2518A813001F3547 /* UsageModalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D0AEBE2518A813001F3547 /* UsageModalView.swift */; }; 23 | A9D5697825182EA1008C1E47 /* DoHConfigListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D5697725182EA1008C1E47 /* DoHConfigListView.swift */; }; 24 | A9D56984251830D7008C1E47 /* OptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9D56983251830D7008C1E47 /* OptionsView.swift */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | A936588C2516F93300402DA5 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = A93658722516F93100402DA5 /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = A93658792516F93100402DA5; 33 | remoteInfo = "DNS Configurator"; 34 | }; 35 | A93658972516F93300402DA5 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = A93658722516F93100402DA5 /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = A93658792516F93100402DA5; 40 | remoteInfo = "DNS Configurator"; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | A936587A2516F93100402DA5 /* DNS Configurator.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DNS Configurator.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | A936587D2516F93100402DA5 /* DNS_ConfiguratorApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNS_ConfiguratorApp.swift; sourceTree = ""; }; 47 | A936587F2516F93100402DA5 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 48 | A93658812516F93300402DA5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | A93658842516F93300402DA5 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 50 | A93658862516F93300402DA5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | A936588B2516F93300402DA5 /* DNS ConfiguratorTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "DNS ConfiguratorTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | A936588F2516F93300402DA5 /* DNS_ConfiguratorTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNS_ConfiguratorTests.swift; sourceTree = ""; }; 53 | A93658912516F93300402DA5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | A93658962516F93300402DA5 /* DNS ConfiguratorUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "DNS ConfiguratorUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | A936589A2516F93300402DA5 /* DNS_ConfiguratorUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNS_ConfiguratorUITests.swift; sourceTree = ""; }; 56 | A936589C2516F93300402DA5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | A93658AB2516F96600402DA5 /* DNS Configurator.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "DNS Configurator.entitlements"; sourceTree = ""; }; 58 | A93658AD2516F96600402DA5 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; }; 59 | A9833DED2517336700DA388F /* DoHConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoHConfig.swift; sourceTree = ""; }; 60 | A9833DF8251735AC00DA388F /* DoHConfigDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoHConfigDetailView.swift; sourceTree = ""; }; 61 | A9D0AEA82518740E001F3547 /* DoHConfigView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoHConfigView.swift; sourceTree = ""; }; 62 | A9D0AEAD25188F7A001F3547 /* DoHStatusView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoHStatusView.swift; sourceTree = ""; }; 63 | A9D0AEB625189F63001F3547 /* DNSSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DNSSettings.swift; sourceTree = ""; }; 64 | A9D0AEBE2518A813001F3547 /* UsageModalView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UsageModalView.swift; sourceTree = ""; }; 65 | A9D5697725182EA1008C1E47 /* DoHConfigListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoHConfigListView.swift; sourceTree = ""; }; 66 | A9D56983251830D7008C1E47 /* OptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionsView.swift; sourceTree = ""; }; 67 | /* End PBXFileReference section */ 68 | 69 | /* Begin PBXFrameworksBuildPhase section */ 70 | A93658772516F93100402DA5 /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | A93658AE2516F96600402DA5 /* NetworkExtension.framework in Frameworks */, 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | A93658882516F93300402DA5 /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | A93658932516F93300402DA5 /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | /* End PBXFrameworksBuildPhase section */ 93 | 94 | /* Begin PBXGroup section */ 95 | A93658712516F93100402DA5 = { 96 | isa = PBXGroup; 97 | children = ( 98 | A936587C2516F93100402DA5 /* DNS Configurator */, 99 | A936588E2516F93300402DA5 /* DNS ConfiguratorTests */, 100 | A93658992516F93300402DA5 /* DNS ConfiguratorUITests */, 101 | A936587B2516F93100402DA5 /* Products */, 102 | A93658AC2516F96600402DA5 /* Frameworks */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | A936587B2516F93100402DA5 /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | A936587A2516F93100402DA5 /* DNS Configurator.app */, 110 | A936588B2516F93300402DA5 /* DNS ConfiguratorTests.xctest */, 111 | A93658962516F93300402DA5 /* DNS ConfiguratorUITests.xctest */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | A936587C2516F93100402DA5 /* DNS Configurator */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | A9833DEC2517334900DA388F /* Model */, 120 | A9D0AEB525189F35001F3547 /* Store */, 121 | A9D5697F25182F4F008C1E47 /* View */, 122 | A93658AB2516F96600402DA5 /* DNS Configurator.entitlements */, 123 | A936587D2516F93100402DA5 /* DNS_ConfiguratorApp.swift */, 124 | A93658812516F93300402DA5 /* Assets.xcassets */, 125 | A93658862516F93300402DA5 /* Info.plist */, 126 | A93658832516F93300402DA5 /* Preview Content */, 127 | ); 128 | path = "DNS Configurator"; 129 | sourceTree = ""; 130 | }; 131 | A93658832516F93300402DA5 /* Preview Content */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | A93658842516F93300402DA5 /* Preview Assets.xcassets */, 135 | ); 136 | path = "Preview Content"; 137 | sourceTree = ""; 138 | }; 139 | A936588E2516F93300402DA5 /* DNS ConfiguratorTests */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | A936588F2516F93300402DA5 /* DNS_ConfiguratorTests.swift */, 143 | A93658912516F93300402DA5 /* Info.plist */, 144 | ); 145 | path = "DNS ConfiguratorTests"; 146 | sourceTree = ""; 147 | }; 148 | A93658992516F93300402DA5 /* DNS ConfiguratorUITests */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | A936589A2516F93300402DA5 /* DNS_ConfiguratorUITests.swift */, 152 | A936589C2516F93300402DA5 /* Info.plist */, 153 | ); 154 | path = "DNS ConfiguratorUITests"; 155 | sourceTree = ""; 156 | }; 157 | A93658AC2516F96600402DA5 /* Frameworks */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | A93658AD2516F96600402DA5 /* NetworkExtension.framework */, 161 | ); 162 | name = Frameworks; 163 | sourceTree = ""; 164 | }; 165 | A9833DEC2517334900DA388F /* Model */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | A9833DED2517336700DA388F /* DoHConfig.swift */, 169 | ); 170 | path = Model; 171 | sourceTree = ""; 172 | }; 173 | A9D0AEB525189F35001F3547 /* Store */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | A9D0AEB625189F63001F3547 /* DNSSettings.swift */, 177 | ); 178 | path = Store; 179 | sourceTree = ""; 180 | }; 181 | A9D5697F25182F4F008C1E47 /* View */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | A936587F2516F93100402DA5 /* ContentView.swift */, 185 | A9D0AEA82518740E001F3547 /* DoHConfigView.swift */, 186 | A9833DF8251735AC00DA388F /* DoHConfigDetailView.swift */, 187 | A9D5697725182EA1008C1E47 /* DoHConfigListView.swift */, 188 | A9D0AEAD25188F7A001F3547 /* DoHStatusView.swift */, 189 | A9D56983251830D7008C1E47 /* OptionsView.swift */, 190 | A9D0AEBE2518A813001F3547 /* UsageModalView.swift */, 191 | ); 192 | path = View; 193 | sourceTree = ""; 194 | }; 195 | /* End PBXGroup section */ 196 | 197 | /* Begin PBXNativeTarget section */ 198 | A93658792516F93100402DA5 /* DNS Configurator */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = A936589F2516F93300402DA5 /* Build configuration list for PBXNativeTarget "DNS Configurator" */; 201 | buildPhases = ( 202 | A93658762516F93100402DA5 /* Sources */, 203 | A93658772516F93100402DA5 /* Frameworks */, 204 | A93658782516F93100402DA5 /* Resources */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | ); 210 | name = "DNS Configurator"; 211 | productName = "DNS Configurator"; 212 | productReference = A936587A2516F93100402DA5 /* DNS Configurator.app */; 213 | productType = "com.apple.product-type.application"; 214 | }; 215 | A936588A2516F93300402DA5 /* DNS ConfiguratorTests */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = A93658A22516F93300402DA5 /* Build configuration list for PBXNativeTarget "DNS ConfiguratorTests" */; 218 | buildPhases = ( 219 | A93658872516F93300402DA5 /* Sources */, 220 | A93658882516F93300402DA5 /* Frameworks */, 221 | A93658892516F93300402DA5 /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | A936588D2516F93300402DA5 /* PBXTargetDependency */, 227 | ); 228 | name = "DNS ConfiguratorTests"; 229 | productName = "DNS ConfiguratorTests"; 230 | productReference = A936588B2516F93300402DA5 /* DNS ConfiguratorTests.xctest */; 231 | productType = "com.apple.product-type.bundle.unit-test"; 232 | }; 233 | A93658952516F93300402DA5 /* DNS ConfiguratorUITests */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = A93658A52516F93300402DA5 /* Build configuration list for PBXNativeTarget "DNS ConfiguratorUITests" */; 236 | buildPhases = ( 237 | A93658922516F93300402DA5 /* Sources */, 238 | A93658932516F93300402DA5 /* Frameworks */, 239 | A93658942516F93300402DA5 /* Resources */, 240 | ); 241 | buildRules = ( 242 | ); 243 | dependencies = ( 244 | A93658982516F93300402DA5 /* PBXTargetDependency */, 245 | ); 246 | name = "DNS ConfiguratorUITests"; 247 | productName = "DNS ConfiguratorUITests"; 248 | productReference = A93658962516F93300402DA5 /* DNS ConfiguratorUITests.xctest */; 249 | productType = "com.apple.product-type.bundle.ui-testing"; 250 | }; 251 | /* End PBXNativeTarget section */ 252 | 253 | /* Begin PBXProject section */ 254 | A93658722516F93100402DA5 /* Project object */ = { 255 | isa = PBXProject; 256 | attributes = { 257 | LastSwiftUpdateCheck = 1200; 258 | LastUpgradeCheck = 1200; 259 | TargetAttributes = { 260 | A93658792516F93100402DA5 = { 261 | CreatedOnToolsVersion = 12.0; 262 | }; 263 | A936588A2516F93300402DA5 = { 264 | CreatedOnToolsVersion = 12.0; 265 | TestTargetID = A93658792516F93100402DA5; 266 | }; 267 | A93658952516F93300402DA5 = { 268 | CreatedOnToolsVersion = 12.0; 269 | TestTargetID = A93658792516F93100402DA5; 270 | }; 271 | }; 272 | }; 273 | buildConfigurationList = A93658752516F93100402DA5 /* Build configuration list for PBXProject "DNS Configurator" */; 274 | compatibilityVersion = "Xcode 9.3"; 275 | developmentRegion = en; 276 | hasScannedForEncodings = 0; 277 | knownRegions = ( 278 | en, 279 | Base, 280 | ); 281 | mainGroup = A93658712516F93100402DA5; 282 | productRefGroup = A936587B2516F93100402DA5 /* Products */; 283 | projectDirPath = ""; 284 | projectRoot = ""; 285 | targets = ( 286 | A93658792516F93100402DA5 /* DNS Configurator */, 287 | A936588A2516F93300402DA5 /* DNS ConfiguratorTests */, 288 | A93658952516F93300402DA5 /* DNS ConfiguratorUITests */, 289 | ); 290 | }; 291 | /* End PBXProject section */ 292 | 293 | /* Begin PBXResourcesBuildPhase section */ 294 | A93658782516F93100402DA5 /* Resources */ = { 295 | isa = PBXResourcesBuildPhase; 296 | buildActionMask = 2147483647; 297 | files = ( 298 | A93658852516F93300402DA5 /* Preview Assets.xcassets in Resources */, 299 | A93658822516F93300402DA5 /* Assets.xcassets in Resources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | A93658892516F93300402DA5 /* Resources */ = { 304 | isa = PBXResourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | A93658942516F93300402DA5 /* Resources */ = { 311 | isa = PBXResourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | /* End PBXResourcesBuildPhase section */ 318 | 319 | /* Begin PBXSourcesBuildPhase section */ 320 | A93658762516F93100402DA5 /* Sources */ = { 321 | isa = PBXSourcesBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | A9D0AEBF2518A813001F3547 /* UsageModalView.swift in Sources */, 325 | A9D0AEAE25188F7A001F3547 /* DoHStatusView.swift in Sources */, 326 | A9D0AEB725189F63001F3547 /* DNSSettings.swift in Sources */, 327 | A93658802516F93100402DA5 /* ContentView.swift in Sources */, 328 | A936587E2516F93100402DA5 /* DNS_ConfiguratorApp.swift in Sources */, 329 | A9D0AEA92518740E001F3547 /* DoHConfigView.swift in Sources */, 330 | A9D5697825182EA1008C1E47 /* DoHConfigListView.swift in Sources */, 331 | A9D56984251830D7008C1E47 /* OptionsView.swift in Sources */, 332 | A9833DF9251735AC00DA388F /* DoHConfigDetailView.swift in Sources */, 333 | A9833DEE2517336700DA388F /* DoHConfig.swift in Sources */, 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | }; 337 | A93658872516F93300402DA5 /* Sources */ = { 338 | isa = PBXSourcesBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | A93658902516F93300402DA5 /* DNS_ConfiguratorTests.swift in Sources */, 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | }; 345 | A93658922516F93300402DA5 /* Sources */ = { 346 | isa = PBXSourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | A936589B2516F93300402DA5 /* DNS_ConfiguratorUITests.swift in Sources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | /* End PBXSourcesBuildPhase section */ 354 | 355 | /* Begin PBXTargetDependency section */ 356 | A936588D2516F93300402DA5 /* PBXTargetDependency */ = { 357 | isa = PBXTargetDependency; 358 | target = A93658792516F93100402DA5 /* DNS Configurator */; 359 | targetProxy = A936588C2516F93300402DA5 /* PBXContainerItemProxy */; 360 | }; 361 | A93658982516F93300402DA5 /* PBXTargetDependency */ = { 362 | isa = PBXTargetDependency; 363 | target = A93658792516F93100402DA5 /* DNS Configurator */; 364 | targetProxy = A93658972516F93300402DA5 /* PBXContainerItemProxy */; 365 | }; 366 | /* End PBXTargetDependency section */ 367 | 368 | /* Begin XCBuildConfiguration section */ 369 | A936589D2516F93300402DA5 /* Debug */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_ANALYZER_NONNULL = YES; 374 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 376 | CLANG_CXX_LIBRARY = "libc++"; 377 | CLANG_ENABLE_MODULES = YES; 378 | CLANG_ENABLE_OBJC_ARC = YES; 379 | CLANG_ENABLE_OBJC_WEAK = YES; 380 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 381 | CLANG_WARN_BOOL_CONVERSION = YES; 382 | CLANG_WARN_COMMA = YES; 383 | CLANG_WARN_CONSTANT_CONVERSION = YES; 384 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 385 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 386 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 387 | CLANG_WARN_EMPTY_BODY = YES; 388 | CLANG_WARN_ENUM_CONVERSION = YES; 389 | CLANG_WARN_INFINITE_RECURSION = YES; 390 | CLANG_WARN_INT_CONVERSION = YES; 391 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 392 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 393 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 395 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 396 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 397 | CLANG_WARN_STRICT_PROTOTYPES = YES; 398 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 399 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 400 | CLANG_WARN_UNREACHABLE_CODE = YES; 401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 402 | COPY_PHASE_STRIP = NO; 403 | DEBUG_INFORMATION_FORMAT = dwarf; 404 | ENABLE_STRICT_OBJC_MSGSEND = YES; 405 | ENABLE_TESTABILITY = YES; 406 | GCC_C_LANGUAGE_STANDARD = gnu11; 407 | GCC_DYNAMIC_NO_PIC = NO; 408 | GCC_NO_COMMON_BLOCKS = YES; 409 | GCC_OPTIMIZATION_LEVEL = 0; 410 | GCC_PREPROCESSOR_DEFINITIONS = ( 411 | "DEBUG=1", 412 | "$(inherited)", 413 | ); 414 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 415 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 416 | GCC_WARN_UNDECLARED_SELECTOR = YES; 417 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 418 | GCC_WARN_UNUSED_FUNCTION = YES; 419 | GCC_WARN_UNUSED_VARIABLE = YES; 420 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 421 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 422 | MTL_FAST_MATH = YES; 423 | ONLY_ACTIVE_ARCH = YES; 424 | SDKROOT = iphoneos; 425 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 426 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 427 | }; 428 | name = Debug; 429 | }; 430 | A936589E2516F93300402DA5 /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | ALWAYS_SEARCH_USER_PATHS = NO; 434 | CLANG_ANALYZER_NONNULL = YES; 435 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 436 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 437 | CLANG_CXX_LIBRARY = "libc++"; 438 | CLANG_ENABLE_MODULES = YES; 439 | CLANG_ENABLE_OBJC_ARC = YES; 440 | CLANG_ENABLE_OBJC_WEAK = YES; 441 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 442 | CLANG_WARN_BOOL_CONVERSION = YES; 443 | CLANG_WARN_COMMA = YES; 444 | CLANG_WARN_CONSTANT_CONVERSION = YES; 445 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 446 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 447 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 448 | CLANG_WARN_EMPTY_BODY = YES; 449 | CLANG_WARN_ENUM_CONVERSION = YES; 450 | CLANG_WARN_INFINITE_RECURSION = YES; 451 | CLANG_WARN_INT_CONVERSION = YES; 452 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 453 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 454 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 455 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 456 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 457 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 458 | CLANG_WARN_STRICT_PROTOTYPES = YES; 459 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 460 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 461 | CLANG_WARN_UNREACHABLE_CODE = YES; 462 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 463 | COPY_PHASE_STRIP = NO; 464 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 465 | ENABLE_NS_ASSERTIONS = NO; 466 | ENABLE_STRICT_OBJC_MSGSEND = YES; 467 | GCC_C_LANGUAGE_STANDARD = gnu11; 468 | GCC_NO_COMMON_BLOCKS = YES; 469 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 470 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 471 | GCC_WARN_UNDECLARED_SELECTOR = YES; 472 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 473 | GCC_WARN_UNUSED_FUNCTION = YES; 474 | GCC_WARN_UNUSED_VARIABLE = YES; 475 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 476 | MTL_ENABLE_DEBUG_INFO = NO; 477 | MTL_FAST_MATH = YES; 478 | SDKROOT = iphoneos; 479 | SWIFT_COMPILATION_MODE = wholemodule; 480 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 481 | VALIDATE_PRODUCT = YES; 482 | }; 483 | name = Release; 484 | }; 485 | A93658A02516F93300402DA5 /* Debug */ = { 486 | isa = XCBuildConfiguration; 487 | buildSettings = { 488 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 489 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 490 | CODE_SIGN_ENTITLEMENTS = "DNS Configurator/DNS Configurator.entitlements"; 491 | CODE_SIGN_STYLE = Automatic; 492 | CURRENT_PROJECT_VERSION = 4; 493 | DEVELOPMENT_ASSET_PATHS = "\"DNS Configurator/Preview Content\""; 494 | DEVELOPMENT_TEAM = 788YH48Y3Q; 495 | ENABLE_PREVIEWS = YES; 496 | INFOPLIST_FILE = "DNS Configurator/Info.plist"; 497 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 498 | LD_RUNPATH_SEARCH_PATHS = ( 499 | "$(inherited)", 500 | "@executable_path/Frameworks", 501 | ); 502 | MARKETING_VERSION = 1.0.1; 503 | PRODUCT_BUNDLE_IDENTIFIER = "jp.tetra2000.DNS-Configurator"; 504 | PRODUCT_NAME = "$(TARGET_NAME)"; 505 | SUPPORTS_MACCATALYST = YES; 506 | SWIFT_VERSION = 5.0; 507 | TARGETED_DEVICE_FAMILY = "1,2"; 508 | }; 509 | name = Debug; 510 | }; 511 | A93658A12516F93300402DA5 /* Release */ = { 512 | isa = XCBuildConfiguration; 513 | buildSettings = { 514 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 515 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 516 | CODE_SIGN_ENTITLEMENTS = "DNS Configurator/DNS Configurator.entitlements"; 517 | CODE_SIGN_STYLE = Automatic; 518 | CURRENT_PROJECT_VERSION = 4; 519 | DEVELOPMENT_ASSET_PATHS = "\"DNS Configurator/Preview Content\""; 520 | DEVELOPMENT_TEAM = 788YH48Y3Q; 521 | ENABLE_PREVIEWS = YES; 522 | INFOPLIST_FILE = "DNS Configurator/Info.plist"; 523 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 524 | LD_RUNPATH_SEARCH_PATHS = ( 525 | "$(inherited)", 526 | "@executable_path/Frameworks", 527 | ); 528 | MARKETING_VERSION = 1.0.1; 529 | PRODUCT_BUNDLE_IDENTIFIER = "jp.tetra2000.DNS-Configurator"; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | SUPPORTS_MACCATALYST = YES; 532 | SWIFT_VERSION = 5.0; 533 | TARGETED_DEVICE_FAMILY = "1,2"; 534 | }; 535 | name = Release; 536 | }; 537 | A93658A32516F93300402DA5 /* Debug */ = { 538 | isa = XCBuildConfiguration; 539 | buildSettings = { 540 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 541 | BUNDLE_LOADER = "$(TEST_HOST)"; 542 | CODE_SIGN_STYLE = Automatic; 543 | DEVELOPMENT_TEAM = 788YH48Y3Q; 544 | INFOPLIST_FILE = "DNS ConfiguratorTests/Info.plist"; 545 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 546 | LD_RUNPATH_SEARCH_PATHS = ( 547 | "$(inherited)", 548 | "@executable_path/Frameworks", 549 | "@loader_path/Frameworks", 550 | ); 551 | PRODUCT_BUNDLE_IDENTIFIER = "jp.tetra2000.DNS-ConfiguratorTests"; 552 | PRODUCT_NAME = "$(TARGET_NAME)"; 553 | SWIFT_VERSION = 5.0; 554 | TARGETED_DEVICE_FAMILY = "1,2"; 555 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DNS Configurator.app/DNS Configurator"; 556 | }; 557 | name = Debug; 558 | }; 559 | A93658A42516F93300402DA5 /* Release */ = { 560 | isa = XCBuildConfiguration; 561 | buildSettings = { 562 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 563 | BUNDLE_LOADER = "$(TEST_HOST)"; 564 | CODE_SIGN_STYLE = Automatic; 565 | DEVELOPMENT_TEAM = 788YH48Y3Q; 566 | INFOPLIST_FILE = "DNS ConfiguratorTests/Info.plist"; 567 | IPHONEOS_DEPLOYMENT_TARGET = 14.0; 568 | LD_RUNPATH_SEARCH_PATHS = ( 569 | "$(inherited)", 570 | "@executable_path/Frameworks", 571 | "@loader_path/Frameworks", 572 | ); 573 | PRODUCT_BUNDLE_IDENTIFIER = "jp.tetra2000.DNS-ConfiguratorTests"; 574 | PRODUCT_NAME = "$(TARGET_NAME)"; 575 | SWIFT_VERSION = 5.0; 576 | TARGETED_DEVICE_FAMILY = "1,2"; 577 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/DNS Configurator.app/DNS Configurator"; 578 | }; 579 | name = Release; 580 | }; 581 | A93658A62516F93300402DA5 /* Debug */ = { 582 | isa = XCBuildConfiguration; 583 | buildSettings = { 584 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 585 | CODE_SIGN_STYLE = Automatic; 586 | DEVELOPMENT_TEAM = 788YH48Y3Q; 587 | INFOPLIST_FILE = "DNS ConfiguratorUITests/Info.plist"; 588 | LD_RUNPATH_SEARCH_PATHS = ( 589 | "$(inherited)", 590 | "@executable_path/Frameworks", 591 | "@loader_path/Frameworks", 592 | ); 593 | PRODUCT_BUNDLE_IDENTIFIER = "jp.tetra2000.DNS-ConfiguratorUITests"; 594 | PRODUCT_NAME = "$(TARGET_NAME)"; 595 | SWIFT_VERSION = 5.0; 596 | TARGETED_DEVICE_FAMILY = "1,2"; 597 | TEST_TARGET_NAME = "DNS Configurator"; 598 | }; 599 | name = Debug; 600 | }; 601 | A93658A72516F93300402DA5 /* Release */ = { 602 | isa = XCBuildConfiguration; 603 | buildSettings = { 604 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 605 | CODE_SIGN_STYLE = Automatic; 606 | DEVELOPMENT_TEAM = 788YH48Y3Q; 607 | INFOPLIST_FILE = "DNS ConfiguratorUITests/Info.plist"; 608 | LD_RUNPATH_SEARCH_PATHS = ( 609 | "$(inherited)", 610 | "@executable_path/Frameworks", 611 | "@loader_path/Frameworks", 612 | ); 613 | PRODUCT_BUNDLE_IDENTIFIER = "jp.tetra2000.DNS-ConfiguratorUITests"; 614 | PRODUCT_NAME = "$(TARGET_NAME)"; 615 | SWIFT_VERSION = 5.0; 616 | TARGETED_DEVICE_FAMILY = "1,2"; 617 | TEST_TARGET_NAME = "DNS Configurator"; 618 | }; 619 | name = Release; 620 | }; 621 | /* End XCBuildConfiguration section */ 622 | 623 | /* Begin XCConfigurationList section */ 624 | A93658752516F93100402DA5 /* Build configuration list for PBXProject "DNS Configurator" */ = { 625 | isa = XCConfigurationList; 626 | buildConfigurations = ( 627 | A936589D2516F93300402DA5 /* Debug */, 628 | A936589E2516F93300402DA5 /* Release */, 629 | ); 630 | defaultConfigurationIsVisible = 0; 631 | defaultConfigurationName = Release; 632 | }; 633 | A936589F2516F93300402DA5 /* Build configuration list for PBXNativeTarget "DNS Configurator" */ = { 634 | isa = XCConfigurationList; 635 | buildConfigurations = ( 636 | A93658A02516F93300402DA5 /* Debug */, 637 | A93658A12516F93300402DA5 /* Release */, 638 | ); 639 | defaultConfigurationIsVisible = 0; 640 | defaultConfigurationName = Release; 641 | }; 642 | A93658A22516F93300402DA5 /* Build configuration list for PBXNativeTarget "DNS ConfiguratorTests" */ = { 643 | isa = XCConfigurationList; 644 | buildConfigurations = ( 645 | A93658A32516F93300402DA5 /* Debug */, 646 | A93658A42516F93300402DA5 /* Release */, 647 | ); 648 | defaultConfigurationIsVisible = 0; 649 | defaultConfigurationName = Release; 650 | }; 651 | A93658A52516F93300402DA5 /* Build configuration list for PBXNativeTarget "DNS ConfiguratorUITests" */ = { 652 | isa = XCConfigurationList; 653 | buildConfigurations = ( 654 | A93658A62516F93300402DA5 /* Debug */, 655 | A93658A72516F93300402DA5 /* Release */, 656 | ); 657 | defaultConfigurationIsVisible = 0; 658 | defaultConfigurationName = Release; 659 | }; 660 | /* End XCConfigurationList section */ 661 | }; 662 | rootObject = A93658722516F93100402DA5 /* Project object */; 663 | } 664 | -------------------------------------------------------------------------------- /DNS Configurator.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DNS Configurator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DNS Configurator.xcodeproj/xcuserdata/takahiko.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DNS Configurator.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Icon-App-20x20@2x-1.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "Icon-App-20x20@3x.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "Icon-App-29x29@2x.png", 17 | "idiom" : "iphone", 18 | "scale" : "2x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "Icon-App-29x29@3x.png", 23 | "idiom" : "iphone", 24 | "scale" : "3x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "Icon-App-40x40@2x.png", 29 | "idiom" : "iphone", 30 | "scale" : "2x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "Icon-App-40x40@3x.png", 35 | "idiom" : "iphone", 36 | "scale" : "3x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "Icon-App-60x60@2x.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "60x60" 44 | }, 45 | { 46 | "filename" : "Icon-App-60x60@3x.png", 47 | "idiom" : "iphone", 48 | "scale" : "3x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "filename" : "Icon-App-20x20@1x.png", 53 | "idiom" : "ipad", 54 | "scale" : "1x", 55 | "size" : "20x20" 56 | }, 57 | { 58 | "filename" : "Icon-App-20x20@2x.png", 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "20x20" 62 | }, 63 | { 64 | "filename" : "Icon-App-29x29@1x.png", 65 | "idiom" : "ipad", 66 | "scale" : "1x", 67 | "size" : "29x29" 68 | }, 69 | { 70 | "filename" : "Icon-App-29x29@2x-1.png", 71 | "idiom" : "ipad", 72 | "scale" : "2x", 73 | "size" : "29x29" 74 | }, 75 | { 76 | "filename" : "Icon-App-40x40@1x.png", 77 | "idiom" : "ipad", 78 | "scale" : "1x", 79 | "size" : "40x40" 80 | }, 81 | { 82 | "filename" : "Icon-App-40x40@2x-1.png", 83 | "idiom" : "ipad", 84 | "scale" : "2x", 85 | "size" : "40x40" 86 | }, 87 | { 88 | "filename" : "Icon-App-76x76@1x.png", 89 | "idiom" : "ipad", 90 | "scale" : "1x", 91 | "size" : "76x76" 92 | }, 93 | { 94 | "filename" : "Icon-App-76x76@2x.png", 95 | "idiom" : "ipad", 96 | "scale" : "2x", 97 | "size" : "76x76" 98 | }, 99 | { 100 | "filename" : "Icon-App-83.5x83.5@2x.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "83.5x83.5" 104 | }, 105 | { 106 | "filename" : "Icon-App-1024x1024.png", 107 | "idiom" : "ios-marketing", 108 | "scale" : "1x", 109 | "size" : "1024x1024" 110 | } 111 | ], 112 | "info" : { 113 | "author" : "xcode", 114 | "version" : 1 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TETRA2000/DNS-Configurator/51d1453ceaadca210652a8695a3fae617d904620/DNS Configurator/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /DNS Configurator/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /DNS Configurator/DNS Configurator.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.developer.networking.networkextension 6 | 7 | dns-settings 8 | 9 | com.apple.security.app-sandbox 10 | 11 | com.apple.security.network.client 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /DNS Configurator/DNS_ConfiguratorApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DNS_ConfiguratorApp.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct DNS_ConfiguratorApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /DNS Configurator/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | 28 | UIApplicationSupportsIndirectInputEvents 29 | 30 | UILaunchScreen 31 | 32 | UIRequiredDeviceCapabilities 33 | 34 | armv7 35 | 36 | UISupportedInterfaceOrientations 37 | 38 | UIInterfaceOrientationPortrait 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UISupportedInterfaceOrientations~ipad 43 | 44 | UIInterfaceOrientationPortrait 45 | UIInterfaceOrientationPortraitUpsideDown 46 | UIInterfaceOrientationLandscapeLeft 47 | UIInterfaceOrientationLandscapeRight 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /DNS Configurator/Model/DoHConfig.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DoHConfig.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/20. 6 | // 7 | 8 | import Foundation 9 | 10 | struct DoHConfig { 11 | let servers: Array 12 | let serverURL: String 13 | let displayText: String 14 | } 15 | -------------------------------------------------------------------------------- /DNS Configurator/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /DNS Configurator/Store/DNSSettings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DNSSettings.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/21. 6 | // 7 | 8 | import NetworkExtension 9 | 10 | class DNSSettings: ObservableObject { 11 | @Published var active: NEDNSOverHTTPSSettings? = nil { 12 | didSet { 13 | if active == nil { 14 | resolverEnabled = false 15 | } 16 | } 17 | } 18 | @Published var resolverEnabled: Bool = false 19 | 20 | func loadDoH() { 21 | NEDNSSettingsManager.shared().loadFromPreferences { loadError in 22 | if let loadError = loadError { 23 | print(loadError) 24 | self.active = nil 25 | return 26 | } 27 | 28 | if let dnsSettings = NEDNSSettingsManager.shared().dnsSettings as? NEDNSOverHTTPSSettings { 29 | self.active = dnsSettings 30 | self.resolverEnabled = NEDNSSettingsManager.shared().isEnabled 31 | } else { 32 | self.active = nil 33 | } 34 | } 35 | } 36 | 37 | func removeDoH() { 38 | NEDNSSettingsManager.shared().removeFromPreferences(completionHandler: { 39 | removeError in 40 | // TODO 41 | if let removeError = removeError { 42 | print(removeError.localizedDescription) 43 | return 44 | } 45 | 46 | self.active = nil 47 | }) 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /DNS Configurator/View/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/20. 6 | // 7 | 8 | import SwiftUI 9 | import NetworkExtension 10 | 11 | struct ContentView: View { 12 | @Environment(\.horizontalSizeClass) var horizontalSizeClass 13 | var dnsSettings = DNSSettings() 14 | var body: some View { 15 | if horizontalSizeClass == .compact { 16 | TabView { 17 | DoHConfigListView() 18 | .tabItem { 19 | Image(systemName: "list.dash") 20 | Text("DNS Server") 21 | } 22 | .environmentObject(dnsSettings) 23 | 24 | DoHStatusView() 25 | .tabItem { 26 | Image(systemName: "waveform.path") 27 | Text("Status") 28 | } 29 | .environmentObject(dnsSettings) 30 | 31 | OptionsView() 32 | .tabItem { 33 | Image(systemName: "wrench.fill") 34 | Text("Extras") 35 | } 36 | .environmentObject(dnsSettings) 37 | } 38 | } else { 39 | NavigationView { 40 | List() { 41 | NavigationLink(destination: DoHConfigListView().environmentObject(dnsSettings)) { 42 | Image(systemName: "list.dash") 43 | Text("DNS Server") 44 | } 45 | NavigationLink(destination: DoHStatusView().environmentObject(dnsSettings)) { 46 | Image(systemName: "waveform.path") 47 | Text("Status") 48 | } 49 | NavigationLink(destination: OptionsView().environmentObject(dnsSettings)) { 50 | Image(systemName: "wrench.fill") 51 | Text("Extras") 52 | } 53 | } 54 | }.navigationBarHidden(false) 55 | } 56 | } 57 | } 58 | 59 | struct ContentView_Previews: PreviewProvider { 60 | static var previews: some View { 61 | ContentView() 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /DNS Configurator/View/DoHConfigDetailView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DoHConfigView.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/20. 6 | // 7 | 8 | import SwiftUI 9 | import NetworkExtension 10 | 11 | struct DoHConfigDetailView: View { 12 | let config: DoHConfig 13 | @Environment(\.presentationMode) var presentationMode 14 | @EnvironmentObject var dnsSettings: DNSSettings 15 | 16 | var body: some View { 17 | VStack { 18 | DoHConfigView(config: config) 19 | Button(action: { 20 | applyDoH(config: config) 21 | presentationMode.wrappedValue.dismiss() 22 | }, label: { 23 | Text("Select this server") 24 | }) 25 | }.padding(.bottom).navigationBarTitle(config.displayText) 26 | } 27 | 28 | func applyDoH(config: DoHConfig) { 29 | NEDNSSettingsManager.shared().loadFromPreferences { loadError in 30 | if let loadError = loadError { 31 | print(loadError) 32 | return 33 | } 34 | let dohSettings = NEDNSOverHTTPSSettings(servers: config.servers) 35 | dohSettings.serverURL = URL(string: config.serverURL) 36 | 37 | NEDNSSettingsManager.shared().dnsSettings = dohSettings 38 | NEDNSSettingsManager.shared().saveToPreferences { saveError in 39 | if let saveError = saveError { 40 | print(saveError.localizedDescription) 41 | return 42 | } 43 | 44 | dnsSettings.active = dohSettings 45 | dnsSettings.resolverEnabled = NEDNSSettingsManager.shared().isEnabled 46 | } 47 | } 48 | } 49 | } 50 | 51 | 52 | struct DoHConfigDetailView_Previews: PreviewProvider { 53 | static let dnsSettings = DNSSettings() 54 | @State static var selectedConfig: DoHConfig? 55 | static var previews: some View { 56 | DoHConfigDetailView(config: DoHConfig(servers: [ "8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844" ], serverURL: "https://cloudflare-dns.com/dns-query", displayText: "Google Public DNS")).environmentObject(dnsSettings) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /DNS Configurator/View/DoHConfigListView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DoHConfigListView.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/21. 6 | // 7 | 8 | import SwiftUI 9 | import NetworkExtension 10 | 11 | struct DoHConfigListView: View { 12 | @State private var configurations: Array = [ 13 | DoHConfig(servers: [ "1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001" ], serverURL: "https://cloudflare-dns.com/dns-query", displayText: "Cloudflare DNS"), 14 | DoHConfig(servers: [ "8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844" ], serverURL: "https://dns.google/dns-query", displayText: "Google Public DNS"), 15 | ] 16 | @Environment(\.horizontalSizeClass) var horizontalSizeClass 17 | @EnvironmentObject var dnsSettings: DNSSettings 18 | @State var showingUsage = false 19 | 20 | var body: some View { 21 | let content = VStack{ 22 | Text("Select a DNS server to use.") 23 | .font(.headline) 24 | .padding(.top) 25 | 26 | List(self.configurations, id: \.servers) { config in 27 | NavigationLink(destination: DoHConfigDetailView(config: config).environmentObject(dnsSettings)) { 28 | Text(config.displayText) 29 | } 30 | } 31 | VStack(alignment: .leading){ 32 | if dnsSettings.active != nil && !dnsSettings.resolverEnabled { 33 | Text("The resolver is inactive.") 34 | .fontWeight(.bold) 35 | .foregroundColor(Color.red) 36 | .padding(.top) 37 | Button(action: { 38 | showingUsage.toggle() 39 | }, label: { 40 | Text("How to activate?") 41 | }).sheet(isPresented: $showingUsage) { 42 | UsageModalView(showingUsage: $showingUsage) 43 | } 44 | } else if dnsSettings.active == nil { 45 | Text("No resolver is selected.") 46 | } 47 | }.padding(.bottom) 48 | }.padding(.bottom).navigationBarTitle("DNS Server") 49 | 50 | if horizontalSizeClass == .compact { 51 | NavigationView { 52 | content 53 | }.onAppear(perform: { 54 | self.dnsSettings.loadDoH() 55 | }).onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in 56 | self.dnsSettings.loadDoH() 57 | } 58 | } else { 59 | content 60 | .onAppear(perform: { 61 | self.dnsSettings.loadDoH() 62 | }).onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in 63 | self.dnsSettings.loadDoH() 64 | } 65 | } 66 | } 67 | } 68 | 69 | struct DoHConfigListView_Previews: PreviewProvider { 70 | static let dnsSettings = DNSSettings() 71 | static var previews: some View { 72 | DoHConfigListView().environmentObject(dnsSettings) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /DNS Configurator/View/DoHConfigView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DoHConfigView.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct DoHConfigView: View { 11 | let config: DoHConfig 12 | 13 | var body: some View { 14 | List { 15 | Section(header: Text("Servers")) { 16 | ForEach(config.servers, id: \.hashValue) { server in 17 | Text(server) 18 | } 19 | } 20 | 21 | Section(header: Text("Query URL")) { 22 | Text(config.serverURL) 23 | } 24 | } 25 | } 26 | } 27 | 28 | 29 | struct DoHConfiglView_Previews: PreviewProvider { 30 | @State static var selectedConfig: DoHConfig? 31 | static var previews: some View { 32 | DoHConfigView(config: DoHConfig(servers: [ "8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844" ], serverURL: "https://cloudflare-dns.com/dns-query", displayText: "Google Public DNS")) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /DNS Configurator/View/DoHStatusView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DoHStatusView.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/21. 6 | // 7 | 8 | import SwiftUI 9 | import NetworkExtension 10 | 11 | struct DoHStatusView: View { 12 | @EnvironmentObject var dnsSettings: DNSSettings 13 | 14 | var body: some View { 15 | VStack { 16 | if let dnsSettings = dnsSettings.active, 17 | let servers = dnsSettings.servers, 18 | let serverURL = dnsSettings.serverURL 19 | { 20 | let config = DoHConfig(servers: servers, serverURL: serverURL.absoluteString, displayText: "") 21 | 22 | Text("Current Configuration") 23 | .font(.headline) 24 | DoHConfigView(config: config) 25 | } else { 26 | Text("No DNS server selected.") 27 | .foregroundColor(Color.gray) 28 | } 29 | }.onAppear(perform: { 30 | dnsSettings.loadDoH() 31 | }).onReceive(NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)) { _ in 32 | dnsSettings.loadDoH() 33 | } 34 | } 35 | } 36 | 37 | 38 | struct DoHStatusView_Previews: PreviewProvider { 39 | static let dnsSettings = DNSSettings() 40 | static var previews: some View { 41 | DoHStatusView().environmentObject(dnsSettings) 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /DNS Configurator/View/OptionsView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OptionsView.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/21. 6 | // 7 | 8 | import SwiftUI 9 | import NetworkExtension 10 | 11 | struct OptionsView: View { 12 | @State var showAlert = false 13 | @State var showRemovalAlert = false { 14 | didSet { 15 | showAlert = showRemovalAlert || showActiveAlert 16 | } 17 | } 18 | @State var showActiveAlert = false { 19 | didSet { 20 | showAlert = showRemovalAlert || showActiveAlert 21 | } 22 | } 23 | @EnvironmentObject var dnsSettings: DNSSettings 24 | 25 | var body: some View { 26 | VStack { 27 | Text("Extras") 28 | .font(.headline) 29 | List { 30 | Section(header: Text("Options")) { 31 | if (dnsSettings.active != nil) { 32 | Button(action: {validateToRemoveDoH()}) { 33 | Text("Remove the resolver setting") 34 | .foregroundColor(Color.red) 35 | } 36 | .alert(isPresented: $showAlert) { 37 | if (showActiveAlert) { 38 | return Alert( 39 | title: Text("Can't remove active setting"), 40 | message: Text("Please select another DNS provider in Setting app.") 41 | ) 42 | } else { 43 | return Alert( 44 | title: Text("Confirmation"), 45 | message: Text("Are you sure to remove the resolver setting?"), 46 | primaryButton: .destructive(Text("Remove"), action: {dnsSettings.removeDoH()}), 47 | secondaryButton: .cancel(Text("Cancel"), action: {showRemovalAlert.toggle()}) 48 | ) 49 | } 50 | } 51 | 52 | } else { 53 | Text("No options available.") 54 | .foregroundColor(Color.gray) 55 | } 56 | } 57 | 58 | Section(header: Text("About This App")) { 59 | Button(action: { 60 | UIApplication.shared.open(URL(string: "https://github.com/TETRA2000/DNS-Configurator")!) 61 | }, label: { 62 | Text("Source Code (github.com)") 63 | }) 64 | } 65 | } 66 | } 67 | } 68 | 69 | func validateToRemoveDoH() { 70 | NEDNSSettingsManager.shared().loadFromPreferences { loadError in 71 | if let loadError = loadError { 72 | print(loadError) 73 | return 74 | } 75 | 76 | showActiveAlert = NEDNSSettingsManager.shared().isEnabled 77 | if !showActiveAlert { 78 | showRemovalAlert = true 79 | } 80 | } 81 | } 82 | } 83 | 84 | 85 | struct OptionsView_Previews: PreviewProvider { 86 | static let dnsSettings = DNSSettings() 87 | static var previews: some View { 88 | OptionsView().environmentObject(dnsSettings) 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /DNS Configurator/View/UsageModalView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UsageModalView.swift 3 | // DNS Configurator 4 | // 5 | // Created by Takahiko Inayama on 2020/09/21. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct UsageModalView: View { 11 | @Binding var showingUsage: Bool 12 | 13 | var body: some View { 14 | VStack{ 15 | VStack(alignment: .leading) { 16 | Text("1. Open Settings App.") 17 | .padding(.bottom) 18 | Text("2. Navigate to \"General\" -> \"VPN & Network\" -> \"DNS\".").lineLimit(nil).padding(.bottom) 19 | Text("3. Select \"DNS Configurator\".") 20 | .padding(.bottom) 21 | }.padding(EdgeInsets(top: 0, leading: 10, bottom: 0, trailing: 10)) 22 | 23 | Button(action: {showingUsage.toggle()}, label: { 24 | Text("Dismiss") 25 | }) 26 | .padding(.top) 27 | } 28 | } 29 | } 30 | 31 | 32 | struct UsageModalView_Previews: PreviewProvider { 33 | @State static var showingUsage = true 34 | static var previews: some View { 35 | UsageModalView(showingUsage: $showingUsage) 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /DNS ConfiguratorTests/DNS_ConfiguratorTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DNS_ConfiguratorTests.swift 3 | // DNS ConfiguratorTests 4 | // 5 | // Created by Takahiko Inayama on 2020/09/20. 6 | // 7 | 8 | import XCTest 9 | @testable import DNS_Configurator 10 | 11 | class DNS_ConfiguratorTests: XCTestCase { 12 | 13 | override func setUpWithError() throws { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | } 16 | 17 | override func tearDownWithError() throws { 18 | // Put teardown code here. This method is called after the invocation of each test method in the class. 19 | } 20 | 21 | func testExample() throws { 22 | // This is an example of a functional test case. 23 | // Use XCTAssert and related functions to verify your tests produce the correct results. 24 | } 25 | 26 | func testPerformanceExample() throws { 27 | // This is an example of a performance test case. 28 | self.measure { 29 | // Put the code you want to measure the time of here. 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /DNS ConfiguratorTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /DNS ConfiguratorUITests/DNS_ConfiguratorUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DNS_ConfiguratorUITests.swift 3 | // DNS ConfiguratorUITests 4 | // 5 | // Created by Takahiko Inayama on 2020/09/20. 6 | // 7 | 8 | import XCTest 9 | 10 | class DNS_ConfiguratorUITests: XCTestCase { 11 | 12 | override func setUpWithError() throws { 13 | // Put setup code here. This method is called before the invocation of each test method in the class. 14 | 15 | // In UI tests it is usually best to stop immediately when a failure occurs. 16 | continueAfterFailure = false 17 | 18 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 19 | } 20 | 21 | override func tearDownWithError() throws { 22 | // Put teardown code here. This method is called after the invocation of each test method in the class. 23 | } 24 | 25 | func testExample() throws { 26 | // UI tests must launch the application that they test. 27 | let app = XCUIApplication() 28 | app.launch() 29 | 30 | // Use recording to get started writing UI tests. 31 | // Use XCTAssert and related functions to verify your tests produce the correct results. 32 | } 33 | 34 | func testLaunchPerformance() throws { 35 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { 36 | // This measures how long it takes to launch your application. 37 | measure(metrics: [XCTApplicationLaunchMetric()]) { 38 | XCUIApplication().launch() 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /DNS ConfiguratorUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /PRIVACY.md: -------------------------------------------------------------------------------- 1 | # Privacy Policy 2 | 3 | ## I do not collect any personal information 4 | 5 | I do not collect any personal information in DNS Configurator. 6 | 7 | Resolver settings are stored on your device. 8 | 9 | Queries being sent to public DNS services are treated under their privacy policies. 10 | 11 | 12 | - [Frequently Asked Questions  |  Public DNS  |  Google Developers](https://developers.google.com/speed/public-dns/faq) 13 | - [1.1.1.1 Public DNS Resolver | Cloudflare Developer Docs](https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/) 14 | 15 | 16 | ## Contact information 17 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DNS Configurator 2 | 3 | [![Alt text](.github/Download_on_the_App_Store_Badge.svg)](https://apps.apple.com/jp/app/dns-configurator/id1532682460?l=en) 4 | 5 | ## About 6 | 7 | Simple DoH(DNS over HTTPS) configuration tool. 8 | 9 | ## Usage 10 | 11 | 1. Select a DNS service from a list. 12 | 1. Tap `Apply` button to update Network Extension. 13 | 1. Open Settings app in iOS. 14 | 1. Navigate to `General` -> `VPN & Network` -> `DNS`. 15 | 1. Select `DNS Configurator`. 16 | 17 | ## References 18 | 19 | - [Enable encrypted DNS - WWDC 2020 - Videos - Apple Developer](https://developer.apple.com/videos/play/wwdc2020/10047/) 20 | 21 | 22 | ## Screen Shots 23 | 24 | ScreenShot1 25 | ScreenShot2 26 | ScreenShot3 27 | --------------------------------------------------------------------------------