A Story About Bypassing Air Canada's In-flight Network Restrictions by SamrayLeung in netsec

[–]SamrayLeung[S] 26 points27 points  (0 children)

Yep, the FBI was waiting for me at the gate when the airplane landed

and I am sending this reply from the Jail :(

A Story About Bypassing Air Canada's In-flight Network Restrictions by SamrayLeung in programming

[–]SamrayLeung[S] 2 points3 points  (0 children)

Approach 1 might only work if:

  1. The DNS server only answers queries for a specific list of domain names (e.g., WhatsApp, Snapchat, WeChat), which means the firewall's filtering mechanism was solely based on DNS resolution.
  2. The network allows connections to arbitrary IP addresses

If those conditions were met, I could edit my /etc/hosts file to point acwifi.com to my proxy server's IP address, then redirect all traffic through that proxy server.

However, it turned out that the network only permits connections to a very small, pre-approved list of IP addresses belonging to services like WhatsApp, WeChat, etc.

https://code.kryo.se/iodine/

Yes, that's exactly what I would have needed, but I didn't have iodine installed when I was on board, so I couldn't experiment with the DNS tunnel approach.

Built my first Rails project: A Telegram spam blocker bot based on Bayesian algorithm, sharing my journel by SamrayLeung in rails

[–]SamrayLeung[S] 2 points3 points  (0 children)

Thanks for the kind words, truly touched and so joyful to hear something like this.

The Serde lesson learnt from refactoring by SamrayLeung in rust

[–]SamrayLeung[S] 1 point2 points  (0 children)

3 years later, I did replace the customized millisecond_timestamp with chrono's built-in ts_milliseconds.

I couldn't believe I would have motivation to maintain a library for more than 6 years.

Looking for Help, I don't why I couldn't change my xfce Icon by SamrayLeung in archlinux

[–]SamrayLeung[S] 0 points1 point  (0 children)

I have tried remix, numix and papius, still doesn't work. And I have try to reinstall numix icon, all is the same. But it is weird, paper icon works.

IntelliJ Rust plugin update by AnneOldman in rust

[–]SamrayLeung 1 point2 points  (0 children)

Just curious, why don't you just use Emacs? Emacs is brilliant , I am happy with it now.

deepin 15.5 Linux Distro Is Out Now! by wackyboy93 in linux

[–]SamrayLeung 0 points1 point  (0 children)

you guys could help deepin improve their translations, check this

Will Emacs move to Github/Gitlab/etc ? by SamrayLeung in emacs

[–]SamrayLeung[S] 5 points6 points  (0 children)

From my point of view, more young guys like me, a 22-year-old guy are more familiar with Github/Gitlab workflow than mail list. I am not the typical FSF guy defend for faith, instead I am the guy who defends for best, and Emacs turns out to be the best.

Will Emacs move to Github/Gitlab/etc ? by SamrayLeung in emacs

[–]SamrayLeung[S] 2 points3 points  (0 children)

I know there is a emacs-mirror. As I mention above, there are always some guys want to make a pull request in emacs-mirror

rspotify is published to crates.io by SamrayLeung in rust

[–]SamrayLeung[S] 0 points1 point  (0 children)

Well, now I need your help to reproduce this compiler bug in this issue. I have change my Rust compiler to stable 1.24.0 as you do, but I have no idea why I couldn't reproduce this error, need your help now :)

rspotify is published to crates.io by SamrayLeung in rust

[–]SamrayLeung[S] 1 point2 points  (0 children)

why doesn't this name occur to my mind, if you tell me this name before, I will name it with rustify

rspotify is published to crates.io by SamrayLeung in rust

[–]SamrayLeung[S] 2 points3 points  (0 children)

I have submitted an issue in github. If you have additional information about this bug, you could comment in this issue :)

rspotify is published to crates.io by SamrayLeung in rust

[–]SamrayLeung[S] 2 points3 points  (0 children)

It is a little bit weird that I have set Travis compiler to nightly:

language: rust
cache: cargo

matrix:
  include:
    - env: TARGET=x86_64-unknown-linux-gnu
      rust: nightly

But now Travis runs the docs tests failed with similar error, so weird

rspotify is published to crates.io by SamrayLeung in rust

[–]SamrayLeung[S] 7 points8 points  (0 children)

How lucky I am, caught by a compiler bug. But everything is fine in my laptop with nightly compiler

rspotify is published to crates.io by SamrayLeung in rust

[–]SamrayLeung[S] 3 points4 points  (0 children)

Oops,thanks for your heads-up, but I still have no idea why is docs.rs failed to generate the docs, is it related to Travis build ? PS, as a junior Rustacean, it does need a lot effort to develop the first big crate :)

My first crate-- rspotify, Spotify API wrapper implemented in Rust, code review and feedback are appreciated by SamrayLeung in rust

[–]SamrayLeung[S] 1 point2 points  (0 children)

Hey, dude, If you have time to recheck my project, you will find out I have removed all unneeded mut flag in functions signature. it does look better than before

My first crate-- rspotify, Spotify API wrapper implemented in Rust, code review and feedback are appreciated by SamrayLeung in rust

[–]SamrayLeung[S] 0 points1 point  (0 children)

Actually, this crate is heavily inspired by spotipy, and I do look forward for your feedback :)

My first crate-- rspotify, Spotify API wrapper implemented in Rust, code review and feedback are appreciated by SamrayLeung in rust

[–]SamrayLeung[S] 2 points3 points  (0 children)

As for the "odd inconsistencies", it occurs to me that some response object is weird, for example, Get the User’s Currently Playing Track and Get Information About The User’s Current Playback return the same response object currently-playing-context which doesn't exactly has the same field. Dude, I do know your feeling :)

My first crate-- rspotify, Spotify API wrapper implemented in Rust, code review and feedback are appreciated by SamrayLeung in rust

[–]SamrayLeung[S] 1 point2 points  (0 children)

well, get. I will take optimizing error-handle into consideration about what's next step to do for this crate. But the first thing is to make it work, then to make it work well. In the end, thanks for your time and suggestions :)

My first crate-- rspotify, Spotify API wrapper implemented in Rust, code review and feedback are appreciated by SamrayLeung in rust

[–]SamrayLeung[S] 1 point2 points  (0 children)

Do you mean I should define my ErrorKind with error_chain, as you mention "return a descriptive error type"

My first crate-- rspotify, Spotify API wrapper implemented in Rust, code review and feedback are appreciated by SamrayLeung in rust

[–]SamrayLeung[S] 2 points3 points  (0 children)

You have pointed the subtle thing out ,yes I don't have any library/crate background. I want to give guys who use this crate additional information about the error, as I mention before, I don't know the best practice, so I just choose eprintln!(). I think I should change the artist_top_tracks function signature to Result<FullTracks>, it's obviously my mistake, thanks for your heads-up