limit incoming connections to localhost

This commit is contained in:
Rob Watson 2009-04-15 11:24:45 +01:00
parent 508fb4719e
commit 1081a9ebc3
4 changed files with 43 additions and 20 deletions

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>${1:Classname} : ${2:Object} {
*new { $3
^super.new.init$4;
}
init { $5
$6
}
}</string>
<key>name</key>
<string>untitled</string>
<key>tabTrigger</key>
<string>class</string>
<key>uuid</key>
<string>7581E1DB-6946-44BB-B836-6F5CE5E99B55</string>
</dict>
</plist>

View File

@ -84,7 +84,7 @@ SC3Controller {
}; };
if(nodes.isEmpty) { if(nodes.isEmpty) {
node = OSCresponderNode(nil, '/sc3ctrl/cmd') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/cmd') { |t, r, msg|
{ {
thisThread.clock = SystemClock; thisThread.clock = SystemClock;
msg[1].asString.interpretPrint; msg[1].asString.interpretPrint;
@ -93,14 +93,14 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/help') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/help') { |t, r, msg|
{ {
msg[1].asString.openHelpFile; msg[1].asString.openHelpFile;
}.defer }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/class') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/class') { |t, r, msg|
// TM version only // TM version only
var fname, cmd; var fname, cmd;
var klass = msg[1].asString; var klass = msg[1].asString;
@ -130,7 +130,7 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/implementations') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/implementations') { |t, r, msg|
if(TextMate.openReferencesInTextMate.state) { if(TextMate.openReferencesInTextMate.state) {
{ this.methodTemplates(msg[1], true) }.defer { this.methodTemplates(msg[1], true) }.defer
} { // open in SC.app } { // open in SC.app
@ -139,7 +139,7 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/references') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/references') { |t, r, msg|
if(TextMate.openReferencesInTextMate.state) { if(TextMate.openReferencesInTextMate.state) {
{ this.methodReferences(msg[1], true) }.defer { this.methodReferences(msg[1], true) }.defer
} { // open in SC.app } { // open in SC.app
@ -148,12 +148,12 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/stop') { |t, r, msg|
thisProcess.stop; nil; thisProcess.stop; nil;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/clear') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/clear') { |t, r, msg|
{ {
Document.listener.string = ""; ""; Document.listener.string = ""; "";
postToFront.(); postToFront.();
@ -161,12 +161,12 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/postfront') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/postfront') { |t, r, msg|
{ postToFront.() }.defer; { postToFront.() }.defer;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/recompile') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/recompile') { |t, r, msg|
{ {
thisProcess.recompile; thisProcess.recompile;
postToFront.(); postToFront.();

View File

@ -21,38 +21,38 @@ SC3Controller {
}; };
if(nodes.isEmpty) { if(nodes.isEmpty) {
node = OSCresponderNode(nil, '/sc3ctrl/cmd') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/cmd') { |t, r, msg|
msg[1].asString.interpretPrint; msg[1].asString.interpretPrint;
{ postToFront.() }.defer; { postToFront.() }.defer;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/help') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/help') { |t, r, msg|
{ msg[1].asString.openHelpFile }.defer { msg[1].asString.openHelpFile }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/class') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/class') { |t, r, msg|
{ msg[1].asString.interpret.openCodeFile }.defer { msg[1].asString.interpret.openCodeFile }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/implementations') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/implementations') { |t, r, msg|
{ SC3Controller.methodTemplates(msg[1]) }.defer { SC3Controller.methodTemplates(msg[1]) }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/references') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/references') { |t, r, msg|
{ SC3Controller.methodReferences(msg[1]) }.defer { SC3Controller.methodReferences(msg[1]) }.defer
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/stop') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/stop') { |t, r, msg|
thisProcess.stop; thisProcess.stop;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/clear') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/clear') { |t, r, msg|
{ {
Document.listener.string = ""; ""; Document.listener.string = ""; "";
postToFront.(); postToFront.();
@ -60,12 +60,12 @@ SC3Controller {
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/postfront') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/postfront') { |t, r, msg|
{ postToFront.() }.defer; { postToFront.() }.defer;
}.add; }.add;
nodes.add(node); nodes.add(node);
node = OSCresponderNode(nil, '/sc3ctrl/recompile') { |t, r, msg| node = OSCresponderNode(NetAddr("localhost", nil), '/sc3ctrl/recompile') { |t, r, msg|
{ {
thisProcess.recompile; thisProcess.recompile;
postToFront.(); postToFront.();

View File

@ -25,6 +25,7 @@
<string>59AA6C90-F786-434B-B10E-DA608EFBC824</string> <string>59AA6C90-F786-434B-B10E-DA608EFBC824</string>
<string>89218E54-78ED-4C0B-92C9-8FEC7E3B2664</string> <string>89218E54-78ED-4C0B-92C9-8FEC7E3B2664</string>
<string>8FA2A21C-E1C9-41AE-AEAB-7FF573747A7C</string> <string>8FA2A21C-E1C9-41AE-AEAB-7FF573747A7C</string>
<string>7581E1DB-6946-44BB-B836-6F5CE5E99B55</string>
<string>2635D12B-F4B6-45B6-8BA4-B50215737165</string> <string>2635D12B-F4B6-45B6-8BA4-B50215737165</string>
<string>FD6AB222-41B0-4851-AE06-D91F5422D7E1</string> <string>FD6AB222-41B0-4851-AE06-D91F5422D7E1</string>
<string>BA4AE872-4314-4D57-B2C6-6A66CCC5F55E</string> <string>BA4AE872-4314-4D57-B2C6-6A66CCC5F55E</string>