A Pen by Tayfun Erbilen on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import aiohttp | |
| from aiohttp_socks import ProxyType, ProxyConnector, ChainProxyConnector | |
| async def fetch(url): | |
| connector = ProxyConnector.from_url('socks5://user:[email protected]:1080') | |
| ### or use ProxyConnector constructor | |
| # connector = ProxyConnector( | |
| # proxy_type=ProxyType.SOCKS5, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('#up').on('click', function(e) { | |
| e.preventDefault(); | |
| let aliasIn = $('#alias').val() | |
| let passIn = $('#pass').val() | |
| gun.get("~@" + aliasIn).once(function (uAlias) { | |
| if (uAlias === undefined) { | |
| console.log("alias undefined, registering.") | |
| user.create($('#alias').val(), $('#pass').val(), function (ack) { | |
| console.log("create user ack: " + ack) | |
| user.auth($('#alias').val(), $('#pass').val()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gun.on('auth', function(){ | |
| $('.loggedOut').hide(); | |
| $('.loggedIn').show(); | |
| user.get('said').map().once(UI); | |
| user.get('alias').val(function(name){ | |
| //console.log(name) | |
| if(upPub !== null){ | |
| let peers = gun.get('peers') | |
| peers.once(function(data){ | |
| let uSet = {name: name, pub: upPub} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setu(node, item){ | |
| let unique = true | |
| let comparison = function (data) { | |
| let aProps = Object.getOwnPropertyNames(data); | |
| let bProps = Object.getOwnPropertyNames(item); | |
| // number of properties | |
| if ((aProps.length-1) === bProps.length) { | |
| for (let i = 1; i < aProps.length; i++) { | |
| let propName = aProps[i]; | |
| // values of same property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user.recall(6 * 60, { // minutes | |
| session: true, | |
| hook: function(props) { // { iat, exp, remember } | |
| console.log("got to hook") | |
| var passed = (Time.now() / 1000) - props.iat; // seconds internally | |
| return (passed < exp) ? ((props.exp += passed) && props) : props; | |
| } | |
| }).then(function(ack) { | |
| console.log("got to then") | |
| if (ack && ack.sea) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setu(node, item){ | |
| let unique = true | |
| node.map().once(function (data) { | |
| let aProps = Object.getOwnPropertyNames(data); | |
| let bProps = Object.getOwnPropertyNames(item); | |
| // number of properties | |
| if ((aProps.length-1) === bProps.length) { | |
| for (let i = 1; i < aProps.length; i++) { | |
| let propName = aProps[i]; | |
| // values of same property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setu(node, item){ | |
| let unique = true | |
| node.map().once(function (data) { | |
| let aProps = Object.getOwnPropertyNames(data); | |
| let bProps = Object.getOwnPropertyNames(item); | |
| // number of properties | |
| if (aProps.length === bProps.length) { | |
| console.log("same len") | |
| for (let i = 0; i < aProps.length; i++) { | |
| let propName = aProps[i]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function isu(node, item){ | |
| node.map().once(function (data) { | |
| let aProps = Object.getOwnPropertyNames(data); | |
| let bProps = Object.getOwnPropertyNames(item); | |
| // number of properties | |
| if (aProps.length === bProps.length) { | |
| console.log("same len") | |
| for (let i = 0; i < aProps.length; i++) { | |
| let propName = aProps[i]; | |
| // values of same property |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #offer was created | |
| {"type":"offer","sdp":"v=0\r\no=- 1757076532130201660 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic: WMS\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:ayhN\r\na=ice-pwd:wSlLKaiyFy9Z3I+YBq0JbDf6\r\na=ice-options:trickle\r\na=fingerprint:sha-256 B2:93:08:8A:C5:49:1D:B4:53:1E:00:B4:ED:48:2A:03:8C:77:6E:BA:A8:52:3D:B1:EB:0D:CA:43:6F:B1:08:0D\r\na=setup:actpass\r\na=mid:0\r\na=sctpmap:5000 webrtc-datachannel 1024\r\n"} | |
| #response was sent | |
| {"type":"answer","sdp":"v=0\r\no=- 8436459379733692345 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0\r\na=msid-semantic: WMS\r\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\r\nc=IN IP4 0.0.0.0\r\nb=AS:30\r\na=ice-ufrag:aaRr\r\na=ice-pwd:k4O6SwMSygQOf1zTh/W1YG3S\r\na=ice-options:trickle\r\na=fingerprint:sha-256 F6:DE:8C:08:E5:1A:EB:8E:50:16:C4:2C:CC:AD:A8:B3:8A:35:2A:4C:BB:1E:99:19:03:0E:FE:B7:06:88:C9:75\r\na=setup:active\r\na=mid:0\r\na=sctp-port:5000\r\n"} | |
| # No public IP in any of that? Some |