Skip to content

Commit 0dae4c5

Browse files
committed
Update divergence chart to ISP based
1 parent 249f597 commit 0dae4c5

7 files changed

Lines changed: 45 additions & 32 deletions

File tree

soaxreport/report/analyze.py

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def main():
9191
res_df = pd.DataFrame(results)
9292
target_domain = res_df['domain'].iloc[0]
9393

94-
# Global Overview (By ISP Pair)
94+
# Global Overview Chart (By ISP Pair)
9595
healthy_pairs = 0
9696
potential_blocking = 0
9797
unreachable = 0
@@ -116,42 +116,54 @@ def main():
116116
plt.savefig(overview_plot, bbox_inches='tight')
117117
plt.close()
118118

119-
# Detailed view for countries with DIVERGENT success rates
119+
# Divergence Chart (Standard TLS vs ECH GREASE ISP)
120120
problematic_list = []
121-
country_groups = res_df.groupby('display_country')
122-
for country, group in country_groups:
123-
c_success_rate = (len(group[group['c_exit'] == 0]) / len(group)) * 100
124-
e_success_rate = (len(group[group['e_exit'] == 0]) / len(group)) * 100
121+
for _, row in res_df.iterrows():
122+
c_success = (row['c_exit'] == 0)
123+
e_success = (row['e_exit'] == 0)
125124

126-
if abs(c_success_rate - e_success_rate) > 0.1:
125+
# Include any pair where the outcome differs
126+
if c_success != e_success:
127+
diff = (100 if e_success else 0) - (100 if c_success else 0)
128+
outcome_type = 'ECH Failed (Standard TLS OK)' if diff < 0 else 'ECH Succeeded (Standard TLS Failed)'
129+
127130
problematic_list.append({
128-
'Country': country,
129-
'No ECH': c_success_rate,
130-
'ECH GREASE': e_success_rate,
131-
'Difference': c_success_rate - e_success_rate
131+
'ISP_Label': f"{row['display_country']} | {row['isp']}",
132+
'Difference': diff,
133+
'Outcome': outcome_type
132134
})
133135

134136
if problematic_list:
135137
prob_df = pd.DataFrame(problematic_list)
138+
# Sort by difference to group similar outcomes
136139
prob_df.sort_values('Difference', ascending=False, inplace=True)
137-
if len(prob_df) > 30:
138-
prob_df = prob_df.head(30)
139-
melted = prob_df.melt(id_vars=['Country'], value_vars=['No ECH', 'ECH GREASE'],
140-
var_name='Test Type', value_name='Success Rate (%)')
141-
plt.figure(figsize=(12, len(prob_df) * 0.4 + 2))
142-
sns.barplot(data=melted, y='Country', x='Success Rate (%)', hue='Test Type', palette={'No ECH': '#66b3ff', 'ECH GREASE': '#ff9999'})
143-
plt.title(f'Countries with Significant ECH Success Rate Divergence\n(Filtered for cases where ECH GREASE != Control)')
144-
plt.xlim(0, 105)
145-
plt.xlabel('Success Rate (%)')
146-
plt.ylabel('Country Code')
140+
141+
# Limit to top 40 for readability if there are many
142+
if len(prob_df) > 40:
143+
prob_df = prob_df.head(40)
144+
145+
plt.figure(figsize=(12, len(prob_df) * 0.5 + 2))
146+
147+
palette = {'ECH Failed (Standard TLS OK)': '#d62728', 'ECH Succeeded (Standard TLS Failed)': '#2ca02c'}
148+
149+
sns.barplot(data=prob_df, x='Difference', y='ISP_Label', hue='Outcome', dodge=False, palette=palette)
150+
151+
plt.title(f'ISP-Level Connectivity Divergence\n(Red = ECH Failed, Green = ECH Succeeded)')
152+
plt.xlim(-110, 110)
153+
plt.axvline(x=0, color='black', linewidth=0.8)
154+
plt.xlabel('Impact (Negative = ECH Failed, Positive = ECH Succeeded)')
155+
plt.ylabel('Country | ISP')
147156
plt.legend(loc='lower right')
157+
158+
plt.xticks([-100, 0, 100], ['ECH FAIL', 'NEUTRAL', 'ECH SUCCESS'])
159+
148160
drilldown_plot = os.path.join(output_dir, "problematic_countries.png")
149161
plt.savefig(drilldown_plot, bbox_inches='tight')
150162
plt.close()
151163
else:
152164
drilldown_plot = None
153165

154-
# Latency Impact Distribution
166+
# Latency Impact Distribution Chart
155167
plt.figure(figsize=(10, 6))
156168
sns.histplot(res_df['delta'], kde=True, color='teal')
157169
plt.axvline(x=0, color='red', linestyle='--')
@@ -200,11 +212,12 @@ def main():
200212
f.write("\"Unreachable\" indicates ISPs that failed both tests, likely due to proxy or local network issues unrelated to ECH.\n\n")
201213

202214
if drilldown_plot:
203-
f.write("## 2. Divergent Countries (Deep Dive)\n\n")
215+
f.write("## 2. Divergent ISP Connectivity (Deep Dive)\n\n")
204216
f.write("![Problematic Countries](problematic_countries.png)\n\n")
205-
f.write("**Figure 2: Success Rate Divergence.** ")
206-
f.write("This chart only displays countries where the success rate of ECH GREASE differs from the control (No ECH). ")
207-
f.write("A significantly shorter red bar compared to the blue bar indicates a strong likelihood of ECH-specific interference in that country.\n\n")
217+
f.write("**Figure 2: ISP-Level Connectivity Divergence.** ")
218+
f.write("This chart highlights ISPs where the connectivity outcome of ECH GREASE differs from standard TLS. ")
219+
f.write("**Red bars (Left)** indicate **ECH Failed** (Standard TLS worked, but ECH failed). ")
220+
f.write("**Green bars (Right)** indicate **ECH Succeeded** (Standard TLS failed, but ECH succeeded), showing cases where ECH maintained connectivity despite standard TLS issues.\n\n")
208221

209222
f.write("## 3. Performance Impact\n\n")
210223
f.write("![Latency Delta](latency_delta.png)\n\n")
23.5 KB
Loading

soaxreport/report/mail_google_com/raw-report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ This report analyzed **878** valid ISP pairs. ECH GREASE does **not** appear to
1818

1919
**Figure 1: Global Connectivity Distribution.** This chart illustrates the health of tested ISP vantage points. "Healthy" represents successful connections with and without ECH. "Potential ECH Blocking" identifies cases where only the standard TLS succeeded. "Unreachable" indicates ISPs that failed both tests, likely due to proxy or local network issues unrelated to ECH.
2020

21-
## 2. Divergent Countries (Deep Dive)
21+
## 2. Divergent ISP Connectivity (Deep Dive)
2222

2323
![Problematic Countries](problematic_countries.png)
2424

25-
**Figure 2: Success Rate Divergence.** This chart only displays countries where the success rate of ECH GREASE differs from the control (No ECH). A significantly shorter red bar compared to the blue bar indicates a strong likelihood of ECH-specific interference in that country.
25+
**Figure 2: ISP-Level Connectivity Divergence.** This chart highlights ISPs where the connectivity outcome of ECH GREASE differs from standard TLS. **Red bars (Left)** indicate **ECH Failed** (Standard TLS worked, but ECH failed). **Green bars (Right)** indicate **ECH Succeeded** (Standard TLS failed, but ECH succeeded), showing cases where ECH maintained connectivity despite standard TLS issues.
2626

2727
## 3. Performance Impact
2828

29.5 KB
Loading

soaxreport/report/www_google_com/raw-report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ This report analyzed **878** valid ISP pairs. ECH GREASE does **not** appear to
1818

1919
**Figure 1: Global Connectivity Distribution.** This chart illustrates the health of tested ISP vantage points. "Healthy" represents successful connections with and without ECH. "Potential ECH Blocking" identifies cases where only the standard TLS succeeded. "Unreachable" indicates ISPs that failed both tests, likely due to proxy or local network issues unrelated to ECH.
2020

21-
## 2. Divergent Countries (Deep Dive)
21+
## 2. Divergent ISP Connectivity (Deep Dive)
2222

2323
![Problematic Countries](problematic_countries.png)
2424

25-
**Figure 2: Success Rate Divergence.** This chart only displays countries where the success rate of ECH GREASE differs from the control (No ECH). A significantly shorter red bar compared to the blue bar indicates a strong likelihood of ECH-specific interference in that country.
25+
**Figure 2: ISP-Level Connectivity Divergence.** This chart highlights ISPs where the connectivity outcome of ECH GREASE differs from standard TLS. **Red bars (Left)** indicate **ECH Failed** (Standard TLS worked, but ECH failed). **Green bars (Right)** indicate **ECH Succeeded** (Standard TLS failed, but ECH succeeded), showing cases where ECH maintained connectivity despite standard TLS issues.
2626

2727
## 3. Performance Impact
2828

61.5 KB
Loading

soaxreport/report/www_youtube_com/raw-report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ This report analyzed **878** valid ISP pairs. ECH GREASE shows **minor** regiona
1818

1919
**Figure 1: Global Connectivity Distribution.** This chart illustrates the health of tested ISP vantage points. "Healthy" represents successful connections with and without ECH. "Potential ECH Blocking" identifies cases where only the standard TLS succeeded. "Unreachable" indicates ISPs that failed both tests, likely due to proxy or local network issues unrelated to ECH.
2020

21-
## 2. Divergent Countries (Deep Dive)
21+
## 2. Divergent ISP Connectivity (Deep Dive)
2222

2323
![Problematic Countries](problematic_countries.png)
2424

25-
**Figure 2: Success Rate Divergence.** This chart only displays countries where the success rate of ECH GREASE differs from the control (No ECH). A significantly shorter red bar compared to the blue bar indicates a strong likelihood of ECH-specific interference in that country.
25+
**Figure 2: ISP-Level Connectivity Divergence.** This chart highlights ISPs where the connectivity outcome of ECH GREASE differs from standard TLS. **Red bars (Left)** indicate **ECH Failed** (Standard TLS worked, but ECH failed). **Green bars (Right)** indicate **ECH Succeeded** (Standard TLS failed, but ECH succeeded), showing cases where ECH maintained connectivity despite standard TLS issues.
2626

2727
## 3. Performance Impact
2828

0 commit comments

Comments
 (0)