Permalink
Browse files

I like to rename things. It's fun.

  • Loading branch information...
1 parent 3ce48f6 commit 716b7359b5cabb6c800d6051d0c942d463ff6afb @msantos committed Aug 29, 2010
Showing with 10 additions and 10 deletions.
  1. +1 −1 include/seds.hrl
  2. +1 −1 src/seds.erl
  3. +8 −8 src/seds_protocol.erl
View
@@ -46,7 +46,7 @@
data = [] % base64 encoded data
}).
--record(map, {
+-record(config, {
acf = false, % allow client forwarding
acl = [], % forward IP blacklist
acl_port = [22], % forward IP blacklist
View
@@ -181,7 +181,7 @@ map(#state{
f = Fwd,
d = Domains
}) ->
- #map{
+ #config{
acf = ACF,
acl = ACL,
acl_port = ACP,
View
@@ -40,7 +40,7 @@ session(#seds{
forward = {session, Forward},
id = Id
},
- #map{f = Map}) ->
+ #config{f = Map}) ->
F = case Forward + 1 of
N when N > length(Map) -> 1;
N when N < 1 -> 1;
@@ -50,7 +50,7 @@ session(#seds{
session(#seds{
forward = {forward, Forward},
id = Id
- }, #map{}) ->
+ }, #config{}) ->
{Forward, Id}.
forward({_IP, _Port} = Forward) ->
@@ -64,7 +64,7 @@ forward(Id) when is_integer(Id) ->
% B64._Nonce-Sum.id-SessionId.u.IP1.IP2.IP3.IP4-Port.x.Domain
decode({domain, {a, [Base64Nonce, Sum, "id", SessionId, "u",
IP1, IP2, IP3, IP4, Port, "x"|Domain]}},
- #map{d = Domains, acf = true, acl = ACL, acl_port = ACP}) ->
+ #config{d = Domains, acf = true, acl = ACL, acl_port = ACP}) ->
IP = makeaddr({IP1,IP2,IP3,IP4}),
Port1 = list_to_integer(Port),
@@ -86,7 +86,7 @@ decode({domain, {a, [Base64Nonce, Sum, "id", SessionId, "u",
};
decode({domain, {a, [Base64Nonce, Sum, "id", SessionId, "u",
IP1, IP2, IP3, IP4, "x"|Domain]}},
- #map{d = Domains, acf = true, acl = ACL}) ->
+ #config{d = Domains, acf = true, acl = ACL}) ->
IP = makeaddr({IP1,IP2,IP3,IP4}),
@@ -108,7 +108,7 @@ decode({domain, {a, [Base64Nonce, Sum, "id", SessionId, "u",
% mfz.wiztb.onsgmcq.40966-0.id-372571.up.p.example.com
% B64._Nonce-Sum.id-SessionId.up.Domain
decode({domain, {a, [Base64Nonce, Sum, "id", SessionId, "up"|Domain]}},
- #map{d = Domains}) ->
+ #config{d = Domains}) ->
true = check_dn(Domain, Domains),
B64 = string:tokens(Base64Nonce, "."),
@@ -130,7 +130,7 @@ decode({domain, {a, [Base64Nonce, Sum, "id", SessionId, "up"|Domain]}},
% Sum-Nonce.id-SessionId.d.IP1.IP2.IP3.IP4-Port.x.Domain
decode({domain, {_Type, [Sum, _Nonce, "id", SessionId, "d",
IP1, IP2, IP3, IP4, Port, "x"|Domain]}},
- #map{d = Domains, acf = true, acl = ACL, acl_port = ACP}) ->
+ #config{d = Domains, acf = true, acl = ACL, acl_port = ACP}) ->
IP = makeaddr({IP1,IP2,IP3,IP4}),
Port1 = list_to_integer(Port),
@@ -150,7 +150,7 @@ decode({domain, {_Type, [Sum, _Nonce, "id", SessionId, "d",
};
decode({domain, {_Type, [Sum, _Nonce, "id", SessionId, "d",
IP1, IP2, IP3, IP4, "x"|Domain]}},
- #map{d = Domains, acf = true, acl = ACL}) ->
+ #config{d = Domains, acf = true, acl = ACL}) ->
IP = makeaddr({IP1,IP2,IP3,IP4}),
@@ -170,7 +170,7 @@ decode({domain, {_Type, [Sum, _Nonce, "id", SessionId, "d",
% 0-29941.id-10498.down.s.p.example.com
% Sum-Nonce.id-SessionId.down.Domain
decode({domain, {_Type, [Sum, _Nonce, "id", SessionId, "down"|Domain]}},
- #map{d = Domains}) ->
+ #config{d = Domains}) ->
true = check_dn(Domain, Domains),
{Forward, Id} = forward(list_to_integer(SessionId)),

0 comments on commit 716b735

Please sign in to comment.