Politics

xrayspx's picture

Simple location aware ssh tunneling for Chrome (Mac)

Music: 

Hall and Oates - Private Eyes (Seriously, it just came on randomly)
and really, just as I finished formatting the stupid script, Big Brother from Humanwine was playing.

This is both a nice toy to have in a Big Brother Is Watching sense, and a glaring example of why one should never log in and use a Mac (or any other system obviously) as an Administrator. Just have a Regular Guy account, and escalate to Administrator/Root when needed. For example, this tool could be inserted by a script to cause all your browsing traffic to route through a proxy server of an attackers choosing. If you're not running as an Administrator, you can't write the file without escalating. (Example of the risk, though it wouldn't help here, since there is LCE to root...goddammit Apple...)

I had a use case recently where I wanted to have multiple copies of Chromium start in different profiles and with different proxy settings. I'm getting to the point at which I don't think that's really feasible, in that any new instance will assume the proxy settings of any already running instance.

BUT, I did get some cool location aware-ish proxying set up. Since one use case involves laptops, I'd like to see it use a local proxy when I'm home, and a remote proxy when I'm not at home (hosted VPS for instance).

I'm using ssh to set up a SOCKS5 proxy, and push all traffic including DNS through the tunnel, ssh'ing to different hosts based on different local system IPs. I have it checking en0 and en1 and if their IPs match my home subnet, it ssh's to a local system, if they are anything else, it will run against a publicly hosted system to which I can ssh.

Next step is to clean up after itself, so when you run Chromium (or Chrome), it will detect IPs, ssh to the appropriate host, and connect using that tunnel. When Chromium closes, it cleans up the SSH session so it's not just hanging around.

To use - Have a local and remote host you can ssh to using keys, and which allow you to forward. On the Mac, navigate to /Applications/Chromium.app/Contents/MacOS/. Rename Chromium to Chromium-bin. Drop this script in, chmod appropriately, and name it Chromium. Now when the Chromium app is run, it runs our script to set up proxies and launch the browser:


#! /bin/bash

ip0=`ifconfig en0 | grep -v inet6 | grep inet | awk '{print $2}' | awk -F "." '{print $1"."$2"."$3}'`
ip1=`ifconfig en1 | grep -v inet6 | grep inet | awk '{print $2}' | awk -F "." '{print $1"."$2"."$3}'`

if [ -z "$ip0"  ]
  then
   if [ "$ip1" = "192.168.30" ]
     then
       ssh -C2qTnN -D 8181 username@192.168.30.241 &

       proxypid=`jobs -p`
       /Applications/Chromium.app/Contents/MacOS/Chromium-bin --proxy-server="socks5://127.0.0.1:8181" --host-resolver-rules="MAP * ~NOTFOUND, EXCLUDE 127.0.0.1" --profile-directory=Tunnl 2>&1 /dev/null

       kill $proxypid

      else

        ssh -C2qTnN -D 8181 username@publichost.com &

        proxypid=`jobs -p`
        /Applications/Chromium.app/Contents/MacOS/Chromium-bin --proxy-server="socks5://127.0.0.1:8181" --host-resolver-rules="MAP * ~NOTFOUND, EXCLUDE 127.0.0.1" --profile-directory=Tunnl 2>&1 /dev/null

        kill $proxypid

      fi

  elif [ "$ip0" = "192.168.30" ]
    then
      ssh -C2qTnN -D 8181 username@192.168.30.241 &

      proxypid=`jobs -p`
      /Applications/Chromium.app/Contents/MacOS/Chromium-bin --proxy-server="socks5://127.0.0.1:8181" --host-resolver-rules="MAP * ~NOTFOUND, EXCLUDE 127.0.0.1" --profile-directory=Tunnl 2>&1 /dev/null

      kill $proxypid

  else

      ssh -C2qTnN -D 8181 username@publichost.com &

      proxypid=`jobs -p`
      /Applications/Chromium.app/Contents/MacOS/Chromium-bin --proxy-server="socks5://127.0.0.1:8181" --host-resolver-rules="MAP * ~NOTFOUND, EXCLUDE 127.0.0.1" --profile-directory=Tunnl 2>&1 /dev/null

      kill $proxypid

fi

xrayspx's picture

Hmm. So that's how it is in their family

Music: 

Shriekback - Malaria

TL;DR: Here is how to restore DJ to iTunes, as much as possible

A few months ago, Apple maliciously broke iTunes in several really specific ways, one of which was to drop the DJ functionality, which is basically how I would listen to music.

Reading a thread on JWZ's site this issue, among others, I posted my somewhat-fix for the issue. And it is. A "somewhat" fix. It acts pretty much like DJ used to act, but for two problems. You can't drag things from a window with your whole collection into your "DJ" window (Cause hey, ONLY ONE WINDOW NOW), and besides, I had to create a Smart Playlist to fix it, and you can't add to a smart playlist anyway. There is "Play Next", which I guess works.

My other main gripe with this is that when I hit Next to skip a track, usually it removes it from the top of the playlist, but often enough to annoy the fuck out of me, it doesn't, and I have to go back in and clean up the top of my list a few times a day. Worse, songs I've skipped will come back up in the mix sooner than I would otherwise want them to, since iTunes doesn't know I've skipped them.

I remember reading somewhere that there was a discussion once about how to make iTunes mark something as "Skipped", or at least what the secret parameters are that cause things not to become "Skipped". So tonight it annoyed me enough to hunt around, and of course, the very first hit was back to a different JWZ post from exactly three years ago this week, complaining about this exact skipping thing.

Of course he didn't get a satisfactory answer, because he almost never gets a satisfactory answer to exactly what he asked. It looks like if you skip between 2 and 20 seconds into the song, and don't hit pause ever, it will show as Skipped. Neat.

His Herp Derp checkbox was the only thing that made any of this sane for me in this case.

To mostly restore iTunes DJ, do the following:

Click + at the bottom left of the iTunes window and create a new Smart Playlist. I named mine "DJ-ish".

Match All of the following rules:

  • Last Played not in the last 1 days -- Or however long you want to go between repeats
  • Last Skipped not in the last 2 days -- This will make iTunes clean up most songs you skip using the Next button.
  • Limit to 100 items selected by Random -- or however many upcoming tracks you want it to pull at a time
  • Match only checked items -- Unless you want iTunes to randomly play songs you've explicitly told it you don't want to hear by un-checking them
  • Live Updating

It's pretty simple to get most of that functionality back, but you know what would have been simpler? NOT REMOVING IT.

xrayspx's picture

Salman Rushdie at Portsmouth Music Hall

Music: 

A change of pace tonight. A few months ago, we saw Salman Rushdie speak and do an interview as part of the Writers on a New England Stage series presented by NH Public Radio. He gave a brief reading from his recent memoir, Joseph Anton, followed by an interview.

Listen Here

Fixed Tags:
xrayspx's picture

Scurvy Fundamentalists React To Tragedy

Music: 

This week we've had a massive tragedy. Dozens of innocents killed in the most callous way possible. Everyone, everywhere very, very sad.

Except for those devoutly religious enough to bring their unique view to the whole event. I've been reading statements to the effect that God did not intervene because he is polite enough not to go where he isn't welcome. That the answer to this is that our children should pray before every school day, also, More Guns.

Fixed Tags:
xrayspx's picture

The Coup & People Under The Stairs at the Middle East, 12/5/2012

Music: 

DEVO - Smart Patrol/Mr. DNA

Go Here:Read an interview with Boots Riley, by old friend and excellent writer Tom Andes. -- @The Rumpus

A very happy confluence of events led me to lie to Chris Portugal at The Coup / People Under the Stairs show. The first thing that had to happen was that the original venue for People Under the Stairs had to be unprepared to open. That venue is the Sinclair in Cambridge. It's apparently still not open as they're shuffling shows to TT's and the Royale.

xrayspx's picture

More people I've confused

Music: 

New Order - Dream Attack

This past weekend I had a pretty awkward encounter with two candidates for the NH state house, Andy Hughes, and Henry Mullaney. This was largely my fault for being lazy and not having had my wake-up cigarette yet.

I also never expected them to be Democratic candidates. It was frankly refreshing to see and hear someone say he's my candidate for the state legislature, and that his interests include protecting a woman's right to choose, and improving education options, specifically the state technical college system.

I'm much more used to having one of:

  • Canvassers affiliated with a Republican candidate, basically just pamphlet-hander-outers
  • People trying to sell me stuff
  • People trying to sell me religions

These guys were pretty friendly, if a tiny bit bewildered by my out-awkwarding them. In my own defense though, come on folks, this is New Hampshire we're talking about here. I'm lucky to know the names of my neighbors, let alone have a chat with my state rep. hopefuls. I expect this kind of thing in the south, but in New England, I only expect to be sold knives and vacuum cleaners or Jesus, in that order. If a candidate (or candidates) for office shows up at your door, don't drop the ball, give 'em a chat. Don't bungle the encounter like my staggering, un-kempt, still-waking-up self did.

You'd have to spend time around me to fully appreciate what "xrayspx Unkempt" can look like and why it might be jarring to a man wearing a tie.

In exchange for their befuddlement, I promise I'll vote for these two, as if there is some case in which my (D) isn't enough of a foregone conclusion.

Fixed Tags:
xrayspx's picture

LGBTQ Bigotry - Finally Speaking Up

Music: 

Leonard Cohen - Anthem

"I really believe that the pagans, and the abortionists, and the feminists, and the gays and the lesbians who are actively trying to make that an alternative lifestyle, the ACLU, People For the American Way -- all of them who have tried to secularize America -- I point the finger in their face and say "you helped this happen."" -- Jerry Falwell, with Pat Robertson, discussing why God sent religious zealots to attack American cities on 9/11/2001.

----
This post is not an attempt at suppression of anyone's speech or opinions. It is an expression on my part of how those words make me feel. People's feelings, bigoted and horrifying though they may be to me, are their own. Americans have the right, and duty, to non-violently advocate their position as strenuously as possible. History and the sands of time will be the judges of which opinion was right or wrong. If you disagree with me and want to comment, feel free to speak your mind. I will certainly speak mine right back. This is ethical advocacy and will not prevent me from having a beer and a dog, and then another beer, with anyone, ever. And we shall breezily talk of other things. Weather. Inferior corn-height (I am a born Hoosier, remember that. I instinctively know what corn is supposed to look like, and when). Baseball. Kittens.
----

I've made it clear through the history of my posts that I'm a vocal advocate for equal protection under the law for all Americans. Many of my inlaws do not share this belief, and out of an abundance of respect for my wife, and the fact that their opinions are their own, I've not said anything about the bigotry I see on a pretty regular basis. I have simply kept my mouth shut and turned the other cheek when I have seen attacks against gays, women and those who they perceive to worship religions different to their own.

However, the last week of batty Chick-Fil-A nonsense has brought things to a head. A string of updates, beginning with "It's unconstitutional for people to protest Chick-Fil-A" and culminating today in "[National Same Sex Kiss Day] is the start of Christian Persecution".

"I think we are inviting God's judgment on our nation when we shake our fist at Him and say, 'We know better than you as to what constitutes a marriage,'" -- Dan Cathy, President and COO, Chick-Fil-A

There is no requirement for people to support a company which actively works to discriminate against those very same people. Just black people and Jews "boycott" Resistance Records, so shall Gay people (and the people who love them) boycott Chick-Fil-A. Resistance Records' first amendment rights are not being infringed upon simply because the object of their hatred doesn't give them money, and neither are the rights of Chick-Fil-A being infringed upon.

This "persecution" angle has finally prompted me to respond.

In the lifetime of our nation, we've seen:

  • Southern Christians abandoned the Republican party for 100 years after Lincoln took away their biblically mandated right to own other human beings. It wasn't until the 1960s until the Nixon/Goldwater Southern Strategy got them back on the team. (This makes me especially upset, because I often see people say both "Republicans, the party of Lincoln" and "Democrats, who opposed equal rights for blacks in the '50s/'60s", because it's not about the party when the demographic shifts 180 degrees, twice. Southern Evangelicals fled the Republican party because of Lincoln, and only returned to the party when racial intolerance became a plank of the Republican platform)
  • Christians protesting the right for women to vote.
  • Christians protesting the right for black people to vote.
  • Christians protesting the right for black people to eat in the same restaurants, drink from the same fountains, and attending the same schools as whites
  • Christians protesting and making laws against interracial marriage.
  • Christians abandoned the Republican party for 100 years after the Republican Lincoln took away their biblically mandated right to own other human beings. Until the Nixon/Goldwater Southern Strategy got them back on the team. (This makes me especially upset, when people say both "Republicans, the party of Lincoln" and "Democrats, who opposed equal rights for blacks in the '50s/'60s", because it's not about the party. Southern Evangelicals fled the Republican party because of Lincoln, and only returned? to the party when racial intolerance became a plank of their platform)



Since it's been said that boycotts are first amendment violations of the rights of Chick-Fil-A's free speech, and that we are seeing the start of Christian oppression in this country. Below is what "Christian Oppression" would actually look like when presented as mirror images of acts of oppression which have actually happened to other groups :

  • The 85% Atheist majority passes laws requiring science be taught to children in Sunday School
  • The 85% Atheist majority taxes churches to the point that it's not financially feasible for them to hold services (Taxes churches out of existence)
  • An Atheist-values-based chicken company gives millions of dollars to hate groups advocating the extermination, expulsion and imprisonment of Christians (Genocide! Ethnic Cleansing!)
  • A pair of lesbians in Wyoming viciously beats a straight Christian man and leaves him to die tied to a fence post for the crime of speaking to them in a bar
  • A lesbian Atheist group rises to national prominence by protesting that same Christian man's funeral carrying disgusting placards stating "God Hates Christians"
  • That same extremist group grows over the next twenty years, protesting the funerals of American soldiers because those soldiers fight for a country which permits Christians to practice their faith
  • A Christian is legally fired from their job simply because of the fact that they believe in Christ. The federal government does not recognize Christians as a protected group, safe from firing based on their religious beliefs.
  • The federal government refuses to recognize Christian marriage, and denies federal tax and death benefits to Christians who were lucky enough to marry in the tiny minority of states which have chosen to permit them to.
  • Athiest hate groups picketing and intimidating Christian Scientists and Jehovas Witnesses and shooting those who legally refuse to take their family to hospitals for medical care and blood transfusions
  • The 85% Atheist majority looting and burning entire countries to find Christian believers and forcibly convert them away from Christ. If the Christians don't renounce religion, they are murdered after watching their entire family die
  • A written test is required for segments of Americans to be allowed to vote. That test includes questions specifically pertaining to things of which Christians as a group have no knowledge. Additionally, a fee is imposed at the voting booth, which is then selectively enforced, but which Christians all must pay in order to cast their vote. If they pass the test, and pay the fee, the Christian vote then only counts as 3/5 the vote of an Atheist

Honestly, to equate yourselves to actual oppressed people is childish, disgusting, and shows a lack of knowledge of history and the struggles of oppressed peoples. The equal rights of gay, lesbian, bisexual and transgendered Americans is just the latest in a very, very long list of basic human rights and equality measures which have been violently opposed by Christians in the name of their bible over the last 400 years in the New World. For Christians to self-identify as some second-class put-upon minority class is frankly sickening.

xrayspx's picture

Catholics, This Is How It's Done

This protestant congregation is reacting in the way I always expected Catholics should have reacted when confronted with a 50 year global child sex abuse conspiracy. Or a 50 year nationwide conspiracy to steal and sell thousands of Spanish newborns. This congregation sounded on the verge of lynching their church leadership after they covered up a minister's arrest for solicitation of prostitution, and further plea deal in which he pled guilty to a lesser charge.

I imagine this is due to them not being cowed into subservience by 1800 years of patriarchal dogma. I applaud this congregation for standing up against their church leaders and their coverup, but I still have lots of questions for members of larger churches.

Why didn't you rise up as one and boo Cardinals and Bishops into hiding?

According to the stats I've seen, between 4% (Church numbers) and 10% (external estimates) of priests were directly involved in the abuse of children. Add to that the hierarchy that hid this from the world and enabled these priests by moving them to other parishes, and you've got quite the conspiracy on your hands. This adds up to quite a large proportion of the church either abusing kids, or having direct knowledge of child abuse and choosing to cover it up rather than go directly to the police.

If you have been, over the course of your lifetime, in the company of 50 priests, at least two of those priests was statistically a child molester, and several more were conspirators.

People have said that such abuse is "in line with society at large". As unlikely as I find that argument, it ignores two huge points:

-- If 4% of priests and 4% of society are child molesters, the difference is that no one. NO. ONE. is willing to conspire with the societal molesters rather than turn them in.

-- I don't know anyone who lives their lives according to the teachings of "Creepy guy who touches himself at the park"

Anyway, I'd love to hear opinions on this. I would directly ask people I know if we could candidly discuss their beliefs and how that affects their feelings about all this, but I'm pretty sure it would cost me friends and family.

Fixed Tags:
xrayspx's picture

Bad Brains with H2O at the Paradise, Boston 4-16-2012

Music: 

Big Black – Bad Penny

(excuses for the rambling. It's not even stream of consciousness, it's subconscious, I'm nowhere near awake enough to do a good job, we'll get through it)

H2o opened, and I have to admit that they were a litte "after my time" for hardcore bands (1996), but I was peripherally aware of them at the time. You know, since I'm 37 and therefore I'm from back in Historical Times, when burgers cost 15 cents and I could get into a movie for a quarter. They were great, pretty much sounded like "Epitaph Band", which it turned out they were. I did recognize a couple songs and they did some good Ian MacKaye birthday tributes in covers and dropping Minor Threat phrases here and there. They had lots of local support and we were all really into it.

It did depress me when Toby Morse did a song from the pit, and said "I'm 42, so you know, don't hurt me", and I was like "shit, you're the 'noob' from 1996, and now you're 42, I wanna hang myself". For the record, Ian MacKaye is now 50. The photos of them largely sucked, but I've got a couple for posterity.

Fixed Tags:
xrayspx's picture

Presidential Candidate Questions

There are several pointed questions I'd like to see people ask our presidential candidates. I'm going to start a list below, if anyone goes to an event, and can get one of these off before being tossed out, I'll buy you a coke. If it gets a reasonable answer, I'll buy you two cokes. If anyone has anything to add, tell me and I'll add it.

I'm going to do them by issue type and candidate, I guess. Most of them are probably pretty interchangeable. I started thinking of these in the context of "questions I would want to ask Rick Santorum", so I'm starting with him.

Fixed Tags:

Pages

Subscribe to RSS - Politics