Skip to content

发布 chromeos-fix-captive-portal#105

Merged
SteveZMTstudios merged 2 commits into
mainfrom
new-post-1780021100249
May 29, 2026
Merged

发布 chromeos-fix-captive-portal#105
SteveZMTstudios merged 2 commits into
mainfrom
new-post-1780021100249

Conversation

@SteveZMTstudios

@SteveZMTstudios SteveZMTstudios commented May 29, 2026

Copy link
Copy Markdown
Owner

Automated submission from editor.

Files:

  • source/_posts/chromeos-fix-captive-portal.md
  • source/images/blog/chromeos-fix-captive-portal/img_1780017788926_0.png
  • source/images/blog/chromeos-fix-captive-portal/img_1780017788926_0_compressed.jpg
  • source/images/blog/chromeos-fix-captive-portal/img_1780021024542_0.png
  • source/images/blog/chromeos-fix-captive-portal/img_1780021024542_0_compressed.jpg
  • source/images/blog/chromeos-fix-captive-portal/img_1780021043487_0.png
  • source/images/blog/chromeos-fix-captive-portal/img_1780021043487_0_compressed.jpg

Summary by Sourcery

Add a new blog post detailing how to fix ChromeOS captive portal connectivity issues and include associated images for the article.

New Features:

  • Introduce documentation for a ChromeOS connectivity-fix script, providing end users with a guided solution to resolve the 'connected but no internet' issue.

Documentation:

  • Publish a new Chinese-language blog article describing a script-based workaround for ChromeOS captive-portal connectivity checks, including prerequisites, usage steps, and known issues.

@sourcery-ai

sourcery-ai Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Adds a new blog post documenting how to patch ChromeOS’s shill binary to fix captive portal connectivity checks, including an embedded Bash script and associated screenshots/thumbnail assets.

Flow diagram for patch_shill.sh captive portal patch process

flowchart TD
    A[start patch_shill.sh] --> B{arg -r ?}
    B -- yes --> R1[check backup exists]
    R1 --> R2[stop_shill]
    R2 --> R3[restore backup to shill]
    R3 --> R4[apply_selinux_context]
    R4 --> R5[restart_shill]
    R5 --> Z[exit]

    B -- no --> C[detect shill path]
    C --> C1[stop_shill]
    C1 --> D{backup exists ?}
    D -- no --> D1[create backup]
    D -- yes --> D2[skip backup]
    D1 --> E[ensure_backup_context]
    D2 --> E

    E --> F[record orig_size]
    F --> G[replace_url for all hardcoded generate_204 endpoints]
    G --> H[record new_size]
    H --> I{orig_size == new_size ?}

    I -- no --> J[rollback_to_backup file size changed]
    J --> Z

    I -- yes --> K[verify replacements with pairs list]
    K --> L{verify_ok == 1 ?}

    L -- yes --> M[print patch ok]
    M --> N[restart_shill]
    N --> Z

    L -- no --> P[rollback_to_backup verify failed]
    P --> Z
Loading

File-Level Changes

Change Details Files
Add new ChromeOS captive-portal troubleshooting blog post with detailed shell script and usage instructions.
  • Create markdown front‑matter with metadata (title, uuid, tags, categories, thumbnail, options).
  • Write narrative sections explaining ChromeOS connectivity checks, prerequisites, solution overview, and known issues.
  • Embed full Bash script (patch_shill.sh) that patches shill’s hard‑coded connectivity check URLs and supports restore mode.
  • Document step‑by‑step usage instructions for running the script via crosh and local file, including rollback steps.
source/_posts/chromeos-fix-captive-portal.md
Add image assets referenced by the new blog post.
  • Add main thumbnail image for the post under the blog image path.
  • Add additional screenshots illustrating ChromeOS network status and script effect in both original and compressed forms.
source/images/blog/chromeos-fix-captive-portal/img_1780017788926_0.png
source/images/blog/chromeos-fix-captive-portal/img_1780017788926_0_compressed.jpg
source/images/blog/chromeos-fix-captive-portal/img_1780021024542_0.png
source/images/blog/chromeos-fix-captive-portal/img_1780021024542_0_compressed.jpg
source/images/blog/chromeos-fix-captive-portal/img_1780021043487_0.png
source/images/blog/chromeos-fix-captive-portal/img_1780021043487_0_compressed.jpg

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

Copy link
Copy Markdown

✅ 构建检查完全通过!

  • 代码构建成功
  • HTML验证通过

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues, and left some high level feedback:

  • The patch script hardcodes the replacement endpoints (google.cn, dl.google.com); consider moving these into clearly grouped variables or a small config section at the top of the script so users can easily change them for different regions or custom endpoints without editing the core logic.
  • Before operating on /usr/bin/shill, you might want to add a simple platform/variant sanity check (e.g., verifying ChromeOS-specific files or shill version/strings) to avoid accidental use on non-target systems or incompatible ChromeOS builds.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The patch script hardcodes the replacement endpoints (google.cn, dl.google.com); consider moving these into clearly grouped variables or a small config section at the top of the script so users can easily change them for different regions or custom endpoints without editing the core logic.
- Before operating on /usr/bin/shill, you might want to add a simple platform/variant sanity check (e.g., verifying ChromeOS-specific files or shill version/strings) to avoid accidental use on non-target systems or incompatible ChromeOS builds.

## Individual Comments

### Comment 1
<location path="source/_posts/chromeos-fix-captive-portal.md" line_range="17" />
<code_context>
+
+一年前多前新入了一个AMD笔记本,算是把老Intel电脑换掉了,而且由于CPU受支持,终于可以装上心心念念的[brunch ChromeOS](https://github.com/sebanc/brunch)+
+关于怎么安装这里不必多赘述,它自带的文档写的还挺清楚。需注意如果要保留安全启动的话,最好是linux安装然后禁用mokutil的shim额外验证。
+
+安装完成之后手机上网开[热点](https://github.com/Mygod/VPNHotspot),网上教程多这里不再讲了。
</code_context>
<issue_to_address>
**issue (typo):** “写的还挺清楚”按规范应为“写得还挺清楚”。

这里的“得”作程度补语,按现代汉语规范一般不用“的”。建议改为「文档写得还挺清楚」。

```suggestion
关于怎么安装这里不必多赘述,它自带的文档写得还挺清楚。需注意如果要保留安全启动的话,最好是linux安装然后禁用mokutil的shim额外验证。
```
</issue_to_address>

### Comment 2
<location path="source/_posts/chromeos-fix-captive-portal.md" line_range="391-392" />
<code_context>
+## 小结
+
+ChromeOS 和 Chromebook 似乎又要成为 Google 的弃子了,哎
+新的 Googlebook 能走多远呢?
+
+本文撰写自 ChromeOS 148。
</code_context>
<issue_to_address>
**question (typo):** 确认一下“Googlebook”是否为刻意使用的说法。

前面一直用的是“Chromebook”,这里突然出现“Googlebook”。如果不是刻意的调侃或用法,建议统一改回“Chromebook”,以免被误以为是正式产品名称。

```suggestion
ChromeOS 和 Chromebook 似乎又要成为 Google 的弃子了,哎
新的 Chromebook 能走多远呢?
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread source/_posts/chromeos-fix-captive-portal.md Outdated
Comment on lines +391 to +392
ChromeOS 和 Chromebook 似乎又要成为 Google 的弃子了,哎
新的 Googlebook 能走多远呢?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question (typo): 确认一下“Googlebook”是否为刻意使用的说法。

前面一直用的是“Chromebook”,这里突然出现“Googlebook”。如果不是刻意的调侃或用法,建议统一改回“Chromebook”,以免被误以为是正式产品名称。

Suggested change
ChromeOS 和 Chromebook 似乎又要成为 Google 的弃子了,哎
新的 Googlebook 能走多远呢?
ChromeOS 和 Chromebook 似乎又要成为 Google 的弃子了,哎
新的 Chromebook 能走多远呢?

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

✅ 构建检查完全通过!

  • 代码构建成功
  • HTML验证通过

@SteveZMTstudios
SteveZMTstudios merged commit 2885808 into main May 29, 2026
5 checks passed
@SteveZMTstudios
SteveZMTstudios deleted the new-post-1780021100249 branch May 29, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant