chkdfront 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56a52ddfb0d5fbbfd69cb1e231bd8e5545d9a7c0467a5a438d1c7783029db7ed
4
- data.tar.gz: 4187aec0c81896522bcef3a528cdf9057fd5e747209a5ff80fedc367a94093b6
3
+ metadata.gz: 458e82ba5393edd95b576bf99464291253a7a9b9a21386a2629df28965574e4b
4
+ data.tar.gz: dde9f1c3d87d5ead9a15fbf9e60ec283fbfa01bd0136c010f7ec4b5c7415e1b4
5
5
  SHA512:
6
- metadata.gz: f3f6407453d3ddf42344038bcfa085031d6d6a4192989b6d08c7d19d86238ac73fad971fd7576c5ddbec238a19c3c35a0d3ac1376e3020bae76bea72b3b26eb6
7
- data.tar.gz: c2e3c72f7efd6079542404911238cd46a6127865c7e3e3a261de699c5800b924b0fed1f74b1a2fd7ae8362019678989e9cc4ebab61fd32c6dc1b27118aa4dc23
6
+ metadata.gz: 1ab944d165abd0d7001b753d9242e0fda7c0099db4a14f659067628218c745f1eb25cef511148ae371ade47953b18f96a7036adca8d318ba2782b5e3cd420cad
7
+ data.tar.gz: 352b8be4ceac4e8c63e87ae898f3f59b85664291bec5d8b09b2b35871226b7a1113271e2b7d045b281316de74f4ff9d2d451fcf445b54e69364ee6df5dc157c7
data/.gitignore CHANGED
@@ -6,141 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
- ### macOS template
10
- # General
11
- .DS_Store
12
- .AppleDouble
13
- .LSOverride
14
-
15
- # Icon must end with two \r
16
- Icon
17
-
18
- # Thumbnails
19
- ._*
20
-
21
- # Files that might appear in the root of a volume
22
- .DocumentRevisions-V100
23
- .fseventsd
24
- .Spotlight-V100
25
- .TemporaryItems
26
- .Trashes
27
- .VolumeIcon.icns
28
- .com.apple.timemachine.donotpresent
29
-
30
- # Directories potentially created on remote AFP share
31
- .AppleDB
32
- .AppleDesktop
33
- Network Trash Folder
34
- Temporary Items
35
- .apdisk
36
- ### Ruby template
37
- *.gem
38
- *.rbc
39
- /.config
40
- /coverage/
41
- /InstalledFiles
42
- /pkg/
43
- /spec/reports/
44
- /spec/examples.txt
45
- /test/tmp/
46
- /test/version_tmp/
47
- /tmp/
48
-
49
- # Used by dotenv library to load environment variables.
50
- # .env
51
-
52
- ## Specific to RubyMotion:
53
- .dat*
54
- .repl_history
55
- build/
56
- *.bridgesupport
57
- build-iPhoneOS/
58
- build-iPhoneSimulator/
59
-
60
- ## Specific to RubyMotion (use of CocoaPods):
61
- #
62
- # We recommend against adding the Pods directory to your .gitignore. However
63
- # you should judge for yourself, the pros and cons are mentioned at:
64
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
65
- #
66
- # vendor/Pods/
67
-
68
- ## Documentation cache and generated files:
69
- /.yardoc/
70
- /_yardoc/
71
- /doc/
72
- /rdoc/
73
-
74
- ## Environment normalization:
75
- /.bundle/
76
- /vendor/bundle
77
- /lib/bundler/man/
78
-
79
- # for a library or gem, you might want to ignore these files since the code is
80
- # intended to run in multiple environments; otherwise, check them in:
81
- # Gemfile.lock
82
- # .ruby-version
83
- # .ruby-gemset
84
-
85
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
86
- .rvmrc
87
- ### JetBrains template
88
- # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
89
- # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
90
-
91
- # User-specific stuff
92
- .idea/**/workspace.xml
93
- .idea/**/tasks.xml
94
- .idea/**/dictionaries
95
- .idea/**/shelf
96
-
97
- # Sensitive or high-churn files
98
- .idea/**/dataSources/
99
- .idea/**/dataSources.ids
100
- .idea/**/dataSources.local.xml
101
- .idea/**/sqlDataSources.xml
102
- .idea/**/dynamic.xml
103
- .idea/**/uiDesigner.xml
104
- .idea/**/dbnavigator.xml
105
-
106
- # Gradle
107
- .idea/**/gradle.xml
108
- .idea/**/libraries
109
-
110
- # CMake
111
- cmake-build-debug/
112
- cmake-build-release/
113
-
114
- # Mongo Explorer plugin
115
- .idea/**/mongoSettings.xml
116
-
117
- # File-based project format
118
- *.iws
119
-
120
- # IntelliJ
121
- out/
122
-
123
- # mpeltonen/sbt-idea plugin
124
- .idea_modules/
125
-
126
- # JIRA plugin
127
- atlassian-ide-plugin.xml
128
-
129
- # Cursive Clojure plugin
130
- .idea/replstate.xml
131
-
132
- # Crashlytics plugin (for Android Studio and IntelliJ)
133
- com_crashlytics_export_strings.xml
134
- crashlytics.properties
135
- crashlytics-build.properties
136
- fabric.properties
137
-
138
- # Editor-based Rest Client
139
- .idea/httpRequests
140
- ### VisualStudioCode template
141
- .vscode/*
142
- !.vscode/settings.json
143
- !.vscode/tasks.json
144
- !.vscode/launch.json
145
- !.vscode/extensions.json
146
-
9
+ /.idea/
data/README.md CHANGED
@@ -1,29 +1,8 @@
1
- # Chkdfront
1
+ # Check Domain Fronting (chkdfront)
2
+ chkdfront checks if your domain fronting is working by testing the targeted domain (fronted domain) against your domain front domain.
2
3
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/chkdfront`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'chkdfront'
13
4
  ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install chkdfront
22
-
23
- ## Usage
24
-
25
- ```
26
- MMMMMMMMMMMMMWNK0kdolc;,'... .;KMMMMMMMMMMMMMMMMMMMMMMMMMMM
5
+ MMMMMMMMMMMMMWNK0kdolc;,' ;KMMMMMMMMMMMMMMMMMMMMMMMMMMM
27
6
  MMMMMMMMMN0xl;'. lNMMMMMMMMMMMMMMMMMMMMMMMMMM
28
7
  MMMMMWKxc'. .kWMMMMMMMMMMMMMMMMMMMMMMMMM
29
8
  MMN0o;. ;XMMMMMMMMMMMMMMMMMMMMMMMMM
@@ -32,7 +11,7 @@ Ol,. .xWMMMMMMMMMMMMMMMMMMMMMMMM
32
11
  l .;dO00ko;'. .kMMMMMMMMMMMMMMMMMMMMMMMM
33
12
  X: .dKNWWXOl,. oWMMMMMMMMMMMMMMMMMMMMMMM
34
13
  M0, 'ldkx; .',,..,;:cc;dNMMMMMMMMMMMMMMMMMMMMMMM
35
- MWk. .dNMMWk. ;ONWWWWWWMMMMMMMMMMMMMMMMMMMMMMMM
14
+ MWk. .doMaiN. ;ONWWWWWWMMMMMMMMMMMMMMMMMMMMMMMM
36
15
  MMWx. lXXKkc. :XMXOo;;coxOKNWMMMMMMMMMMMMMMMMMMM
37
16
  MMMWx. .... ;KMXc. .';cdkKNMMMMMMMMMMMMMM
38
17
  MMMMWk. .:oxxkXMNl .,cx0NMMMMMMMMMM
@@ -42,26 +21,72 @@ MMMMMMMMWO; .lx;. lNMO' .,dKWM
42
21
  MMMMMMMMMMNx;. .. ,0MX: .,:ll:,. .:x
43
22
  MMMMMMMMMMMMNOc. .dWWx. .'lXWMNOc. .
44
23
  MMMMMMMMMMMMMMWXOo:':KMX: .cxO0k; .o
45
- MMMMMMMMMMMMMMMMMMWNNWMk. ,odol,. .dN
46
- MMMMMMMMMMMMMMMMMMMMMMWo .dXWMWO: .dNM
24
+ MMMMMMMMMMMMMMMMMMWNNWMk. ,domain. .N
25
+ MMMMMMMMMMMMMMMMMMMMMMWo .fronting .dNM
47
26
  MMMMMMMMMMMMMMMMMMMMMMNc ;, 'cdxko. .kWMM
48
27
  MMMMMMMMMMMMMMMMMMMMMMNc lKOl. ;0WMMM
49
28
  MMMMMMMMMMMMMMMMMMMMMMWo ,KMW0l. .lXMMMMM
50
29
  MMMMMMMMMMMMMMMMMMMMMMMk. :kKMWXOdolcc:,. ,kWMMMMMM
51
30
  MMMMMMMMMMMMMMMMMMMMMMMNc .'o0XNNNKOo;. 'dXMMMMMMMM
52
31
  MMMMMMMMMMMMMMMMMMMMMMMMK; ..''.. 'dXWMMMMMMMMM
53
- MMMMMMMMMMMMMMMMMMMMMMMMMKc .:xXMMMMMMMMMMMM
54
- MMMMMMMMMMMMMMMMMMMMMMMMMMNk;. .'cxKWMMMMMMMMMMMMMM
32
+ MM By: @KINGSABRI MMMMMMKc .:xXMMMMMMMMMMMM
33
+ MM chkdfront v1.0.1 MMMMNk;. .'cxKWMMMMMMMMMMMMMM
55
34
  MMMMMMMMMMMMMMMMMMMMMMMMMMMMNxl:'....':oOXWMMMMMMMMMMMMMMMMM
56
-
35
+ Check DomainFront (chkdfront) - A tool verifies domain fronting.
57
36
  ```
37
+ ## Features
38
+ * Checking your domain fronted against the domain front.
39
+ * Searching an expected string in the response to indicate success.
40
+ * Showing troubleshooting suggestions when test fails based on the failure natural.
41
+ * Inspecting the HTTP request and response when test fails. (optionally if succeeded).
42
+ * Troubleshooting with various checks (ping, http, nslookup) when test fails. (optionally if succeeded).
43
+ * Support testing though proxy
44
+
45
+ ## Demo
46
+ Please check the demo
47
+ https://asciinema.org/a/nA9wBiuSDLDH9SunQ8GxKT2ra
48
+
49
+ ## Installation
58
50
 
59
- ## Development
51
+ $ gem install chkdfront
60
52
 
61
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
53
+ ## Usage
62
54
 
63
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
55
+ ```
56
+ Help menu:
57
+ -f, --front-target URL Fronted target domain or URL.
58
+ e.g. images.businessweek.com
59
+ -d, --domain-front DOMAIN DomainFront domain.
60
+ e.g. df36z1umwj2fze.cloudfront.net
61
+ -e, --expect STRING Expect a given string that indicates success. (case-sensitive)
62
+ e.g. It works
63
+ -p, --provider NUM Choose CDN / Domain Front Provider:
64
+ [0] Auto (default - auto tune request. Extra request to detect)
65
+ [1] Amazon (tune request for Amazon domain fronting)
66
+ [2] Azure (tune request for Azure domain fronting)
67
+ [3] Alibaba (tune request for Alibaba domain fronting)
68
+ -t, --troubleshoot [DOMAIN] Force troubleshooting procedures.
69
+ execute troubleshooting procedures(ping, http, nslookup) for all parties
70
+ (optional: original domain where CDN forwards, to include in the checks)
71
+ e.g. c2.mydomain.com
72
+ --proxy USER:PASS@HOST:PORT Use proxy settings if you're behind proxy.
73
+ e.g. user1:Pass123@localhost:8080
74
+ --debug Force debugging.
75
+ show response's body and low-level request and response debug trace.
76
+ (default enabled when test fails.)
77
+ -h, --help Show this message.
78
+
79
+ Usage:
80
+ /usr/local/bin/chkdfront <OPTIONS>
81
+ Example:
82
+ /usr/local/bin/chkdfront -f images.businessweek.com -d df36z1umwj2fze.cloudfront.net
83
+ /usr/local/bin/chkdfront -f images.businessweek.com -d df36z1umwj2fze.cloudfront.net --debug -t c2.mysite.com
84
+ ```
64
85
 
65
86
  ## Contributing
66
87
 
67
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/chkdfront.
88
+ 1. Fork it ( https://github.com/KINGSABRI/chkdfront/fork )
89
+ 2. Create your feature branch (git checkout -b my-new-feature)
90
+ 3. Commit your changes (git commit -am 'Add some feature')
91
+ 4. Push to the branch (git push origin my-new-feature)
92
+ 5. Create a new Pull Request
data/bin/chkdfront CHANGED
File without changes
@@ -157,7 +157,7 @@ module ChkDFront
157
157
  " - is service up?",
158
158
  " - is service port correct?",
159
159
  "- Check your provider:",
160
- " - is front domain name correct? (#{@domain_front})",
160
+ " - is front domain name correct? (#{@domain_front.host})",
161
161
  " - is destination port correct?.",
162
162
  ]
163
163
  }
@@ -166,7 +166,7 @@ module ChkDFront
166
166
  orig: response,
167
167
  checks: [
168
168
  "- Check your provider:",
169
- " - is front domain name correct? (#{@domain_front})",
169
+ " - is front domain name correct? (#{@domain_front.host})",
170
170
  "- Check your target:",
171
171
  " - is target domain correct? (#{@front_target.host})",
172
172
  " - is target port correct? (#{@front_target.port})"
@@ -1,3 +1,3 @@
1
1
  module ChkDFront
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chkdfront
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@KINGSABRI"
@@ -164,7 +164,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.0.2
167
+ rubyforge_project:
168
+ rubygems_version: 2.7.6
168
169
  signing_key:
169
170
  specification_version: 4
170
171
  summary: Check Domain Fronting (chkdfront) - It checks if domain fronting is working.