This time we will combine Cloudflare Worker with the free GitHub node collection project, use Worker to filter out those nodes that can be proxied by Worker, create a subscription link, and choose your own clean IP!

Create a Worker

Create a Worker with the following code, plz use Google to search tutorials for creating a Cloudflare Worker!

const subLink = 'https://raw.githubusercontent.com/mahdibland/ShadowsocksAggregator/master/sub/sub_merge.txt';

export default {
  async fetch(request) {
    let url = new URL(request.url);
    let realhostname = url.pathname.split('/')[1];
    let realpathname = url.pathname.split('/')[2];
    if (url.pathname.startsWith('/sub')) {
      let newConfigs = '';
      let resp = await fetch(subLink);
      let subConfigs = await resp.text();
      subConfigs = subConfigs.split('\n');
      for (let subConfig of subConfigs) {
        if (subConfig.search('vmess') != -1) {
          subConfig = subConfig.replace('vmess://', '');
          subConfig = atob(subConfig);
          subConfig = JSON.parse(subConfig);
          if (subConfig.sni && !isIp(subConfig.sni) && subConfig.net == 'ws' && subConfig.port == 443) {
            var configNew = new Object();
            configNew.v = '2';
            configNew.ps = 'Node-' + subConfig.sni;
            if (realpathname == '') {
            configNew.add = url.hostname;
            } else {
              configNew.add = realpathname;
            };
            configNew.port = subConfig.port;
            configNew.id = subConfig.id;
            configNew.net = subConfig.net;
            configNew.host = url.hostname;
            configNew.path = '/' + subConfig.sni + subConfig.path;
            configNew.tls = subConfig.tls;
            configNew.sni = url.hostname;
            configNew.aid = '0';
            configNew.scy = 'auto';
            configNew.type = 'auto';
            configNew.fp = 'chrome';
            configNew.alpn = 'http/1.1';
            configNew = 'vmess://' + btoa(JSON.stringify(configNew));
            newConfigs = newConfigs  + configNew+ '\n';
          }
        }
      }
      return new Response(newConfigs);
    } else {
        const url = new URL(request.url);
        const splitted = url.pathname.replace(/^\/*/, '').split('/');
        const address = splitted[0];
        url.pathname = splitted.slice(1).join('/');
        url.hostname = address;
        url.protocol = 'https';
        return fetch(new Request(url, request));
    }
  },
};


function isIp(ipstr) {
  try {
    if (ipstr == "" || ipstr == undefined) return false;
    if (!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])$/.test(ipstr)) {
      return false;
    }
    var ls = ipstr.split('.');
    if (ls == null || ls.length != 4 || ls[3] == "0" || parseInt(ls[3]) === 0) {
      return false;
    }
    return true;
  } catch (ee) { }
  return false;
}

how to use

Get your Worker URL, usually it is like this https://xxxx-xxxx-xxxx.xxxxxx.workers.dev, open your v2rayN or v2rayNG, add a subscription, the subscription link is

https://xxxx-xxxx-xxxx.xxxxxx.workers.dev/sub/Your.clean.ip

For example

https://xxxx-xxxx-xxxx.xxxxxx.workers.dev/sub/uk.isegaro.click

if u dont have a clean ip, just leave it blank
renew subscription, you will get some nodes, but not every one is usable

tags: v2ray, vmess, free node, free vmess

128 comments.

  1. ali ali

    hi in iran they are going to block *.workers.dev can you guys do some change that we can add our domain into host and sni . and we link that domain to the *.workers.dev and its not block...

  2. addEventListener( "fetch", event => { let url = new URL(event.request.url); let realhostname = url.pathname.split('/')[2]; let realpathname = url.pathname.split('/')[1]; url.hostname = realhostname; url.pathname = '/'+ realpathname; url.protocol = "https"; let request = new Request(url, event.request); event.respondWith( fetch(request) ) } )

  3. Ali Ali

    Thank you so much for helping

  4. iran iran

    not working. all of them don't connect and say : error tls handshake

  5. ف ف

    its bullshit. not working...

    1. Did your mother die? so didn't tell you to be polite

      1. Kourosh Kourosh

        I apologize on behalf of that fool. Thank you for all you're doing.

  6. Hossein Hossein

    Thank segaro & freenod

  7. Ffff Ffff

    Hjknbhb

  8. AAA AAA

    Works great if you use a clean IP. Thx.

  9. aj aj

    i used "ip.isegaro.click" for clean ip and Matsuri client on android devices and it works just fine,
    you may need to toggle between some of locations to see which connect and have the best speed.

    thank you guys so so much

  10. mr mr

    thank

  11. Ahoura Ahoura

    It works very well. Thank you dear friends in FreeNode.
    kind respect from Iran

  12. Vahid Vahid

    GetAFreeNode,Thank you for all your help

  13. sight sight

    thanks, i saw aggregator subs before but never had a chance to use them with workers.
    and this code just made it so simple!!! and probably it works with other sub links too...

  14. Ram Ram

    How to use the worker on my vps server or xiui scripts, can i use my own domain ?
    How can i make my subscribe link that work with my x-ui configs ?

    Tnx.
    But i cant use this yet.

  15. صائب صائب

    با درود
    بعد از ساخت و ویرایش workers در مرحله ای که اقدام به ذخیره میکنم، خطا میده و سیو نمیکنه. برای رفع این اشکال چیکار کنم؟

    1. Nader Nader

      منم این مشکل رو دارم، خطا میده
      دلیلش چیه ؟؟

      1. صائب صائب

        نمیدونم. تمام مراحل رو هم درست انجام میدم

    2. Murix Murix

      baray iphone az appe FairVPN estefade knid. to shadowrocket wa shadowlink kar nmikone

      1. mojtaba mojtaba

        سلام کسی اموزش firevpn بلده

    3. peyman peyman

      قسمت ذخیر فیتر شکن رو خاموش کن بعد دخیره کن

  16. صائب صائب

    با درود
    بعد ساخت worker و اضافه کردن کد دستورات جایی که save and deploy باید بزنم خطا میده و ذخیره نمیکنه.برای رفع این خطا باید چیکار کنم؟

  17. yasin yasin

    Wow, That's amazing and it's work just fine, but i have question, I have a list of ips how can i add them?, ""xx.xxxxxx.workers.dev/sub/143.xxx.xxx.xxx"" with this format i make 100 server with one ip , but i have more than one ip can i add them as a list?

  18. مهرداد مهرداد

    این خونه رو کی ساخته؟ اوستای بنا ساخته تنهای تنها ساخته

    1. علی علی

      با چوب نعنا ساخته
      خودش تنهایی ساخته

  19. یک مرتد یک مرتد

    دهنت سرویس سیگارو عالی بود تقریبا با اپدیت سابسکرایب 128 تا سرور داد که پینگ های همه رو چک کردم 20 تا سالم بود و فکر میکنم بقیشون هم با ور رفتن با تنظیمات ردیف یشه

    1. Hassan Hassan

      داش ناموسا به منم یاد بده توییتراش رو میخونم هیچی حالیم نمیشه چی ب چیه

      1. Murix Murix

        Telegram pm bede rahnamait knm @MurixXx

        1. Arezo Arezo

          Salam , mishe be mnm komak koni ? id tlgrm midm lotfan pm bedid @ASNpage

          1. Murix Murix

            Talash Krdm PM bedam. Mige ID telegramet vojud nadare. Man ID no Bala gozashtm b hamon pm bede ya ID jadideto bede

    2. saman saman

      چیکار کردی .برای من یه سرور هم نیاورد

  20. mmd mmd

    tnx getafreenode

  21. Ali Ali

    I want to know what exactly is ip.isegaro.click is it just a sub domain or it has something pointed towards some hosting. And how can we make our own ?

    2nd : I have a .tk domain how can I used this to create several servers on my domain using workers?

    1. Murix Murix

      1-segaro jan ip tamiz point mikone b subdomainesh. shoma mitoni ip tamiz khodetam bzni farghi nmikone....
      2-sakhte workers b domain rabti ndre wa faghat account CF mikhad. age worker ro roye domain khodet bala avordi ba .tk ham mishe tedad ziadi worker sakht faghat rozane 100k request bishtar nmishe b account cloudflaret bdi.

      1. Richie Richie

        سلام.
        اون آیدی تلگرام که دادی یک بات بود رفیق!
        من پروکسی ها رو می سازم و همه چی اوکیه، فقط نمی دونم چرا کار نمی کنن!

  22. saman saman

    سلام
    همه کارها رو انجام دادم ولی ارور میده کردم ولی هیچ سروری اضافه نشد

    1. Murix Murix

      iphone ? az FairVPN estefde kn

  23. sam sam

    لینک ها تو برنامه ویندوز و اندروید اضافه شد ،ولی
    Failed
    میزنه،تو اندروید هم خطا میده
    تو ویندوز پیام
    Dial system failed, Operation was cancelled

  24. nima nima

    A huge thanks guys, it's working great!!

  25. nader nader

    دمت گرم واقعا ... کامل اوکی شد ... بازم ممنون

  26. Tagarg Tagarg

    چرا وقتی کد رو در کلودفلر وارد و تایید میکنم همش ارور میده

  27. Sam Sam

    It is wonderful! thank you guys, you are the best. you can't imagine how much you helped us. thanks forever.

  28. error error

    502 Bad Gateway
    content-length:1363
    content-type:text/html; charset=UTF-8

    Error communicating with origin body{margin:0;padding:0} Uh oh...Error communicating with origin server (no host header)

    Details

    expected headers.get(kj::HttpHeaderId::HOST) != nullptr

    Performance & security by Cloudflare

  29. farid farid

    Thanks a lot. It works properly. Please let me have clean IP.
    Cheers.
    آقا دمتون گرم. مثل روغن کار می کنه و سرور میده
    لطفا آيپي تميز بديد
    سلامت باشيد

  30. KeyhaN KeyhaN

    خیلی ممنون از تمام کسایی که این راه رو ایجاد کردن. فقط لطفا یکی توضیح بده کلین آی پی رو چطور میشه ایجاد کرد؟ ممنون میشم یکی کامل و مختصر توضیح بده

    1. Alireza Alireza

      مختصری وجود نداره اگه دوست داشتی یاد بگیری برو اینجا
      https://www.youtube.com/watch?v=BKLRAHolhvM&t=2s

  31. Alireza Alireza

    Hi, is it possible for you to create a code like this for clash? because clash program is better and it chose best server automatically, thx.

  32. کارم نیمه کاره مونده لطفاراهنماییم کنیدباتشکر

  33. arian arian

    thanks a lot for your support it's amazing and fast and we really appreciate your help in these times. Thanks a lot.

  34. Arash m Arash m

    It's great, thank you all ! Great speed, great ping, you are incredible!

  35. Amir hossein Amir hossein

    Hello tnx for all of your helps to Iranian in accessing free internet.

    I encounter with problem in this method and its happen when i paste upper code in my cloudflare worker and i click on save and deploy show error:

    {Script cannot be displayed}

    1. lee lee

      Make sure the code is fully copied

  36. k1 k1

    works thank you all

  37. mamaj mamaj

    how do i use this on PC ?

  38. Nima Nima

    برا من همه چی اوکیه ولی روی نت شاتل موقع تست گرفتن ارور http tls timeout میده هیچ کدومشم وصل نمیشه مشکل کجاس؟

  39. arshia arshia

    thank getafreenode.com for your support to iranians people for freedom
    most of this node didn t works or speed of them decreased
    please resolved them
    thanks a lot

  40. ali ali

    از دیروز روی نت پارس آنلاین هیچ روشی که دوستان کد نویسی کردن جواب نمیده و قطع شده

    1. tz tz

      سلام احتمالا آیپی ها فیلتر شده

  41. aras aras

    error handshake failure mide

  42. دمم دمم

    سلام
    چجوری روی v2rayN برای کامپیوتر استفاده کنم ؟

  43. SHA SHA

    i used it for adsl mokhhaberat and Irancell
    Its working
    very nice and great
    thanks all and big thanks segaro

  44. parsa parsa

    متاسفانه دیگه کار نمیکنه چیکار باید کرد؟ :(

  45. ali ali

    کانفیگ ها دریافت و آپدیت میشه ولی هیچ کدوم وصل نمیشه

  46. pine21 pine21

    got 200+ nodes, but no one is usable

  47. سلام من دامنه هم درکلودفلارثبت کردم امانتوانستم سروری شخصی بسازم ونیمه کاره رهاکردن حالا هم نمی دونم چطورسرورv2rayng راجداکنم فقط یکبار۶تاسروربردم اماهیچ کدوم متصل نشد لطفاراهنماییمکنیدممنون

    1. mehdi mehdi

      باید موقع ساختن ورکر کد مخصوص که فری نود داده رو بزنی ، بعد آدرس ورکر با اچ تی تی پی / ساب/آی پی تمیز

      همین رو میزنی تو برنامه بروزرسانی میکنی مثل بنز کلی کانفیگ اضافه میکنه

  48. halo halo

    I want to know if there were any issues with your team. Because the nodes has not worked many days. I will donate some money if your team needs the donations. thanks for everything you do.

  49. Majid Majid

    Hi

    Pleas add a parameter to subscription urls in for iran section to make us be able to give a clean ip for configs

    this is current url: https://getafreenode.com/foriran/iraniansub.php?uuid=82EC2DBF-DE07-4771-8CF8-22A6E5782024&tlsdomain=x.x.workers.dev&operator=IRC

    i need it to be like: https://getafreenode.com/foriran/iraniansub.php?uuid=82EC2DBF-DE07-4771-8CF8-22A6E5782024&tlsdomain=x.x.workers.dev&ip=154.84.175.90

    and put 154.84.175.90 in address section in configs

    when we select "Others" in operator list, add another text box to set an ip

    regards

  50. Anti-filter Anti-filter

    Hi, GetaFreeNode team, and thank you for your efforts and services, especially for Iranian folks. You have no idea how your job helps people do their daily tasks freely. We will appreciate if you continue supporting the community so that hopefully everyone could have access to free internet forever.
    Unfortunately, the brutal regime in Iran has also filterd out the workers.dev IPs, and this trick is no longer working.
    Is it possible that you put your nodes on github with websocket configuration and also IPs that work with Iranian ISPs and put them separately in different files? You can use .tk domain to have your servers' IPs proxied through Cloudflare. However, you may have to add a new domain every couple hours or so if they get blocked. Any other solutions are also very much appreciated. Thank you so much.

  51. shayan shayan

    hi when i copy my worker into box and want to copy the link nothing copied to my clipboard can you help me with this ?

  52. mehdi mehdi

    سلام ، دستتون درد نکنه ، خیلی عالی کار میکنه
    دوستان مراحل رو دقیق انجام بدین درست کار میکنه

    1. elyas ahmadniai elyas ahmadniai

      چطوری درست کنیم

  53. pine21 pine21

    Nodes Unavailable now

    1. pine21 pine21

      nodes unavailable for a week

      1. pine21 pine21

        nodes still unusable

        1. pine21 pine21

          Still unusable. I have to use other paid nodes.

  54. mohammad mohammad

    Hello, thank you for your site and good facilities, I wanted to ask how we can set our own IP? If there is our own IP in the link we took, it should be sub-updated

  55. kia kia

    4 ، روی Quick Edit در سمت راست کلیک کنید ، کد اصلی را با کد زیر جایگزین کنید ، سپس Save and Deploy

    کد اصلی رو از کجا بیارم .
    با کدوم کد جایگزین کنم

    متشکرم

  56. sd sd
  57. محمد محمد

    روی مخابرات جواب نمیده
    اصلا کدی که توی آموزش گذاشتید وقتی توی ورکر جایگزین میکنم خطا میده 504
    کد خود ورکر 200 یعنی سالم میده

  58. alireza alireza

    رو ابر آروان نمیشه همین حرکتو زد؟

  59. Kamran Kamran

    Thanks . it's very cool and worked

  60. mejlon mejlon

    سلام کجا آموزش گام به گام یا مرحله به مرحله هست تا ببینم .

  61. Gary Gary

    The provided code only catches the vmess servers from that source. how to make it distinguish and add trojan servers instead?

  62. mohammad mohammad

    Hello, I left a comment for Reality, I tried my best, I did as you said, but it didn't connect, can you explain more about how to connect?

  63. abie abie

    Your Seattle Server is not working since 2 weeks ago. Please fix it.
    thanks.

  64. کسی ورکر جدید مخصوص کلش خواست میتونه از این استفاده کنه
    https://github.com/coldwater-10/clash_rules/blob/main/freenode-sub-worker.js
    باید لینک فرینود خودتونو جایگزین کنین

    آموزشش توی کانالم هست سوالم داشتین همونجا جواب میدم
    https://t.me/vpnclashfa

  65. elyas ahmadniai elyas ahmadniai

    Iran

  66. Javad Javad

    سلام
    چطور میتونیم با ادمین جهت همکاری در ارتباطات باشیم
    لطفاً ایمیل خود را برای ارتباط بدهید
    یا برای من ایمیل بفرستید
    با تشکر

  67. ali rezaei ali rezaei

    for those who have problem with save and deploy here is the corrected code

    const subLink = 'https://raw.githubusercontent.com/mahdibland/ShadowsocksAggregator/master/sub/sub_merge.txt';

    export default {
    async fetch(request) {
    let url = new URL(request.url);
    let realhostname = url.pathname.split('/')[1];
    let realpathname = url.pathname.split('/')[2];
    if (url.pathname.startsWith('/sub')) {
    let newConfigs = '';
    let resp = await fetch(subLink);
    let subConfigs = await resp.text();
    subConfigs = subConfigs.split('\n');
    for (let subConfig of subConfigs) {
    if (subConfig.search('vmess') != -1) {
    subConfig = subConfig.replace('vmess://', '');
    subConfig = atob(subConfig);
    subConfig = JSON.parse(subConfig);
    if (subConfig.sni && !isIp(subConfig.sni) && subConfig.net == 'ws' && subConfig.port == 443) {
    var configNew = new Object();
    configNew.v = '2';
    configNew.ps = 'Node-' + subConfig.sni;
    if (realpathname == '') {
    configNew.add = url.hostname;
    } else {
    configNew.add = realpathname;
    };
    configNew.port = subConfig.port;
    configNew.id = subConfig.id;
    configNew.net = subConfig.net;
    configNew.host = url.hostname;
    configNew.path = '/' + subConfig.sni + subConfig.path;
    configNew.tls = subConfig.tls;
    configNew.sni = url.hostname;
    configNew.aid = '0';
    configNew.scy = 'auto';
    configNew.type = 'auto';
    configNew.fp = 'chrome';
    configNew.alpn = 'http/1.1';
    configNew = 'vmess://' + btoa(JSON.stringify(configNew));
    newConfigs = newConfigs + configNew+ '\n';
    }
    }
    }
    return new Response(newConfigs);
    } else {
    const url = new URL(request.url);
    const splitted = url.pathname.replace(/^\/*/, '').split('/');
    const address = splitted[0];
    url.pathname = splitted.slice(1).join('/');
    url.hostname = address;
    url.protocol = 'https';
    return fetch(new Request(url, request));
    }
    }
    };

    function isIp(ipstr) {
    try {
    if (ipstr == "" || ipstr == undefined) return false;
    if (!/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])(\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])){2}\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-4])$/.test(ipstr)) {
    return false;
    }
    var ls = ipstr.split('.');
    if (ls == null || ls.length != 4 || ls[3] == "0" || parseInt(ls[3]) === 0) {
    return false;
    }
    return true;
    } catch (ee) { }
    return false;
    }

  68. Ramtin Ramtin

    میشه یه دومین شخصی رو رو ابر اروان یا کلود فر به ورکر وصل کرد ؟ اگه میشه چطوری هست ؟ چه رکور دی باید توش بزارن تا یه ساب دومین به ورکر وصل شه ؟

    1. VIBE VIBE

      سلام دامین‌ت باید تو کلادفلر باشه، بزن رو ورکرت توی کلافر یه بخش داره
      triggers
      اونجا میشه دامنه هایی که توی کلاد فلر داری رو به ورکر وصل کنی

  69. VIBE VIBE

    Thanks man, in this situation it means a lot, till the end for internet freedom.

  70. saeed saeed

    عالیه
    خیلی خوب کار کرد و 285 تا کانفیگ اضافه کرد

  71. milad milad

    Hello, good time, add new servers, most of them are duplicates and they are not fast anymore

  72. Hamrah avval Hamrah avval

    How can I use this subscription for napsternetv app?

  73. Amin Amin

    Hi, thank you for your efforts.
    I do the step by step procejure, after I copy clean IP in the HTTP tab, then I click SEND, and a number of Vmess Servers are shown. Then I copy them and import them into V2ray windows, and I add a subscription group with the link of worker+clean IP. (https://*****.wiseg247273354.workers.dev/sub/clean ip). when in V2Ray I try to update subscription with/without proxy, it fails and this message is shown:
    Access to a socket was not allowed due to the socket's permissions. (*****.wiseg247273354.workers.dev:443)
    ->Invalid subscription content.

    Can anyone help me please?

  74. omid omid

    به این کانال تلگرام ملحق شین تا همیشه متصل باشید و راهنمایی اتصال به فری نود رو هم به شما آموزش بدم @v2ray30
    @v2ray30

  75. kiarad kiarad

    Hello dear and respected team https://getafreenode.com/ Thank you very much for your good site with this internet situation in Iran, you are really a great help, only I had a problem, I don't understand this part, can you please explain it to me.

    https://xxxx-xxxx-xxxx.xxxxxx.workers.dev/sub/Your.clean.ip

  76. saman saman

    I don't have access to a personal computer. Please put the codes for making the worker with an Android phone clearly so that we can copy. Please help me in this matter. If possible, email me the relevant codes. Thank you. God bless you.

  77. Snake Snake

    I can't update it anymore something is wrong with server

  78. Mo Mo

    Hello. I want to report a problem. On your page, which you have created specifically for Iranian users, the subscription link that your website provides has configurations in which, in the path field, errors, the SNI address has also been entered. For this reason, this type of configuration created with Link Worker does not work for users, but after manually changing the path section and deleting the prefixes that were in this section, the configurations work. Please correct this issue. Thanks for your very kind help

  79. Nobody Nobody

    Hi
    i want to say thanks for your efforts and kind full help to Iranian on behalf of all grateful people of my country
    with regards

  80. 1

  81. 555

  82. Thank you for blogging this site,

  83. Hossein Shahverdi Hossein Shahverdi

    Dear Team,
    First of all thank you for your support and efforts in helping us bypass the censorship. there is an issue in restarting the data capacity and once I press the "Submit" button this message pops up

    "Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in /www/wwwroot/getafreenode.com/main/init.php:201 Stack trace: #0 /www/wwwroot/getafreenode.com/resettraffic.php(37): resetTrafficWithBonus() #1 {main} thrown in /www/wwwroot/getafreenode.com/main/init.php on line 201"

  84. What a nice article website Mahakal Bhasm Aarti Facts

  85. I have been surfing online more than 2 hours today,thanks artikel my brother

    https://primeri.greatdomains.shop

  86. benyamin benyamin

    "Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in /www/wwwroot/getafreenode.com/main/init.php:201 Stack trace: #0 /www/wwwroot/getafreenode.com/resettraffic.php(37): resetTrafficWithBonus() #1 {main} thrown in /www/wwwroot/getafreenode.com/main/init.php on line 201"

  87. benyamin benyamin

    "Fatal error: Uncaught Error: Cannot pass parameter 2 by reference in /www/wwwroot/getafreenode.com/main/init.php:201 Stack trace: #0 /www/wwwroot/getafreenode.com/resettraffic.php(37): resetTrafficWithBonus() #1 {main} thrown in /www/wwwroot/getafreenode.com/main/init.php on line 201"

Add a new comment.